css3--text-overflow超出文本隱藏
阿新 • • 發佈:2017-07-03
png psu atq off comm vol num color ini
1 <style> 2 .div1 { 3 width: 200px; 4 height: 200px; 5 background: red url(img/user.png) no-repeat; 6 text-overflow: ellipsis; 7 white-space: nowrap; 8 overflow: hidden; 9 } 10 .div1:hover { 11 overflow: visible; 12 text-overflow: inherit; 13 } 14 15</style>
1 <div class="div1"> 2 qwe Lorem ipsum dolor sit amet, consectetur adipisicing elit. Recusandae voluptatem sapiente fuga facere molestias numquam officiis beatae ex sit atque aspernatur quisquam commodi ratione perspiciatis ducimus dolor minima itaque obcaecati! 3 </div>
css3--text-overflow超出文本隱藏