• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

css控制文字长度:css 控制文字定位_css

css 搞代码 7年前 (2018-06-11) 154次浏览 已收录 0个评论
css控制文字长度:css 控制文字定位_css 以下内容为程序代码
  <style>
    p.double {line-height: 2}
    p.right {text-align: right}
    p.center {text-align: center}
    p.justify {text-align: justify}
    p.indent {text-indent: 1cm}
    p.capitalize {text-transform: capitalize}
    p.up {text-transform: uppercase}
    p.low {text-transform: lowercase}
    p.underline {text-decoration: underline}
    p.line-through {text-decoration: line-through}
    h3 {color: #cc6600}
  </style>

这一节我们将讨论如何用 css 来控制网页中文字定位, 这些性质是 
line-height: 行距 
text-align: 向那个方向看齐 
vertical-align: 向上还是向下看齐 
text-indent: 段落第一行空格 
text-transform: 字母的大小写 
text-decoration: 给文字加装饰, 比如下滑线 
行距
我们有时候可能会想把行距加大点使得文字看的清楚一些. css 
中的 line-height 可以取得这种调节 
  p.double {line-height: 2}
请看下面的比较. 
[code]
<table border=0 cellspacing=8 cellpadding=1 width=500>
<tr><td bgcolor=666666>
<table border=0 cellspacing=0 cellpadding=6 width=100% bgcolor=ffffcc>
<tr><td bgcolor="#ffffcc">
<p>这 一 段 的 行 距 是 正常 的.  这 一 段 的 行 距 是 正常 的.  这 一 段 的 行 
距 是 正常 的.  这 一 段 的 行 距 是 正常 的.  </p> 本文链接http://www.cxybl.com/html/wyzz/CSS/20120601/27369.html

欢迎大家阅读《css控制文字长度:css 控制文字定位_css》,跪求各位点评,若觉得好的话请收藏本文,by 搞代码


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:css控制文字长度:css 控制文字定位_css
喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址