【发布时间】:2016-10-18 01:16:48
【问题描述】:
https://jsfiddle.net/LnbcfmL3/
HTML
<div class="Nav">
<a href="C:\Users\user\Desktop\Computer Science\Rugby_Arguement.html"> Rugby Arguement </a>
</div>
<div class="Nav">
<a href="C:\Users\user\Desktop\Computer Science\Football_Arguement.html"> Football Arguement </a>
</div>
CSS
.Nav{
position: relative;
display: inline-block;
height: 100px;
width: 200px;
border-radius: 100px / 50px;
border: 2px solid black;
left: 150px;
-moz-border-radius: 100px / 50px;
-webkit-border-radius: 100px /50px;
text-align: center;
background-color: #FF6600;
}
a{
text-align: center;
}
这就是我到目前为止所得到的,我的椭圆中的链接文本已经超出了 div 本身。我已经尝试了其他问题中建议的事情大约 2 个小时,但似乎没有任何效果。提前致谢。
【问题讨论】:
-
将:overlfow: hidden 添加到您的 .Nav 类中。
-
将您的
aabsolutely 定位在Nav中