码迷,mamicode.com
首页 > 其他好文 > 详细

文字超出自动截取为...

时间:2016-01-20 13:16:04      阅读:183      评论:0      收藏:0      [点我收藏+]

标签:

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>文字超出自动截取为...</title> </head> <body> <style> *{ margin:0; padding:0; } body{font-family:Arial, Helvetica, sans-serif;} h2,em{ font-weight: normal; font-style: normal; } .test{ width:300px; margin:10px auto 0 auto; border:1px solid #eeeeee; padding:5px; color:#333333; } .test-title{ padding:0 10px; color: red; } /*文字超出自动截取为...*/ .text-cut{ display:block; width:100%; text-overflow: ellipsis; white-space: nowrap; overflow:hidden; } </style> <div class="test"> <h2 class="test-title"> <em class="text-cut">In most browsers, clicking on text or an image within the label will give focus to the area.</em> </h2> <p>What the label does is create an association between its contents and a control on the page. In most browsers, clicking on text or an image within the label will give focus to the area. In the case of a radio button, it will select it and in the case of a checkbox, it‘ll alternate between the two states (checked and unchecked).</p> </div> </body> </html>

文字超出自动截取为...

标签:

原文地址:http://www.cnblogs.com/haiying520/p/5144550.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!