![](/img/trans.png)
[英]How to make text appear when hovering over an image that's inside an anchor tag and the anchor tag is inside a div?
[英]anchor tag text over flow from div box
<div>
<ul>
<li><a href="#">Test_link_is_soooo_long</a></li>
</ul>
</div>
<style>
div {
border: 2px solid rgba(0,0,0,0.1);
width: 150px;
}
a {
overflow: hidden;
text-overflow: ellipsis;
}
</style>
鏈接文本超出邊界,我想修復它。 但沒有任何解決方案。
我如何解決這個問題。
如果您不想增加div的寬度並將鏈接顯示在一行中,請使用文本省略號.with之外的部分將顯示為三個點
div { border: 2px solid rgba(0,0,0,0.1); width: 150px; } a { width: 100px; display:inline-block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
<div> <ul> <li><a href="#">Test_link_is_soooo_long</a></li> </ul> </div>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.