大佬教程收集整理的这篇文章主要介绍了html – 文本背景颜色的溢出,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
但是,对于名字较长的国家来说,效果并不好.
我试图让黄色溢出所有东西并清楚地显示国家的全名.
HTML:
<div class="flagList"> <div class="flagcolumn"> ... </div> <div class="flagcolumn"> ... </div> <div class="flagcolumn"> ... </div> ... </div>@H_607_9@CSS:
.flagcolumn { width: 33%; float: left; border:0px solid; height:1.6em; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; z-index: 1; position:relative; } .flagcolumn:hover { overflow:visible; z-index: 2; position:relative; display: inline; BACkground-color:yellow; }@H_607_9@
.flagcolumn { float: left; height: 1.6em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 33%; z-index: 1; } .flagcolumn:hover { overflow: visible; position: relative; z-index: 2; } .flagcolumn:hover span { BACkground-color: yellow; display: inline-block; height: 100%; }@H_607_9@<div class="flagList"> <div class="flagcolumn"><span>This is test text!</span></div> <div class="flagcolumn"><span>This is a lot longer test text! This is a lot longer test text!</span></div> <div class="flagcolumn"><span>This is a lot longer test text! This is a lot longer test text!</span></div> </div>@H_607_9@
以上是大佬教程为你收集整理的html – 文本背景颜色的溢出全部内容,希望文章能够帮你解决html – 文本背景颜色的溢出所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。