日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

css文本样式处理

發布時間:2023/12/31 编程问答 26 豆豆
生活随笔 收集整理的這篇文章主要介紹了 css文本样式处理 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

這里通過一些實例來演示一下,CSS3 對于文本的屬性樣式~

文本屬性包括:

代碼:

<!DOCTYPE html> <html> <head> <title>文字樣式</title> <style> .newspaper{-moz-column-count:3; /* Firefox */-webkit-column-count:3; /* Safari and Chrome */column-count:3;}.a{color: rebeccapurple; }.b{color: hotpink;direction: rtl;}.c{letter-spacing: 10px;color: yellowgreen;}.d .big{line-height: 200%;}.e :nth-child(1){color: red;text-align: left;}.e :nth-child(2){color: red;text-align: center;}.e :nth-child(3){color: red;text-align: right;}.f :nth-child(1){color: green;text-decoration:overline;}.f :nth-child(2){color: green;text-decoration:line-through;}.f :nth-child(3){color: green;text-decoration:underline;}.f :nth-child(4){color: green;text-decoration:blink}.g{text-indent:50px;}.h{color: khaki;white-space: nowrap;}.i{color: paleturquoise;word-spacing: 10px;}.j .test{white-space:nowrap; width:12em; overflow:hidden; border:1px solid #000000;}.k{text-shadow: 5px 5px 5px #FF0000;}.m .test1{width:11em; border:1px solid #000000;word-break:hyphenate;}.m .test2{width:11em; border:1px solid #000000;word-break:break-all;} </style> </head> <body> <div class="newspaper"><div class="a">aaaaaaaaaaaaaaaaaaaaaaaaaaa123456 顏色</div><div class="b">1234hhhhhppp00000 文本方向</div><div class="c">cccccccccccc字符間距</div><div class="d"><p class="big">這個段落擁有更大的行高。這個段落擁有更大的行高。這個段落擁有更大的行高。這個段落擁有更大的行高。這個段落擁有更大的行高。這個段落擁有更大的行高。這個段落擁有更大的行高。</p></div><div class="e"><p>文本對齊方式1</p><p>文本對齊方式2</p><p>文本對齊方式3</p></div><div class="f"><p>文本修飾1</p><p>文本修飾2</p><p>文本修飾3</p><p>文本修飾4</p></div><div class="g"><p>文本縮進--------123456789oiujhxz我,了防盜門是可麻煩兩年了男方的兩年了給付對價ffdljvnlkmlkdvlkernvkm_φ(?_?? 人丑就要多讀書(。_ 。) ?_學習計劃走起_φ_(..) 寫作業</p></div><div class="h"><p>處理元素之間的空白------這是一些文本。這是一些文本。這是一些文本。這是一些文本。這是一些文本。這是一些文本。這是一些文本。這是一些文本。</p></div><div class="i"><p>this is my name is you name!(letter-spacing設置字符間距,word-spacing設置單詞間距~)</p></div><div class="j" style="border:1px solid #999"><p>下面兩個 div 包含無法在框中容納的長文本。正如您所見,文本被修剪了。</p><p>這個 div 使用 "text-overflow:ellipsis"</p><div class="test" style="text-overflow:ellipsis;">This is some long text that will not fit in the box</div><p>這個 div 使用 "text-overflow:clip"</p><div class="test" style="text-overflow:clip;">This is some long text that will not fit in the box</div></div><div class="k">文本添加陰影!</div><div class="l"></div><div class="m"><p>規定非中日韓文本的換行規則</p><p class="test1">This is a veryveryveryveryveryveryveryveryveryvery long paragraph.</p><p class="test2">This is a veryveryveryveryveryveryveryveryveryvery long paragraph.</p></div><div class="n">nnnnnnnnnnnnnnnnnnnnnnnnnn</div><div class="o">nnnnnnnnnnnnnnnnnnnnnnnnnn</div><div class="p">nnnnnnnnnnnnnnnnnnnnnnnnnn</div><div class="q">nnnnnnnnnnnnnnnnnnnnnnnnnn</div> </div></body> </html>

###效果:

總結

以上是生活随笔為你收集整理的css文本样式处理的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。