生活随笔
收集整理的這篇文章主要介紹了
                                
CSS设置文字粗细
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.                        
 
                                
                            
                            
                            CSS設(shè)置文字粗細(xì)
 
 
 
? ? ? ? ? HTML中通過(guò)添加<b>標(biāo)記,或者<strong>標(biāo)記來(lái)設(shè)置文字的粗細(xì)。
 
? ? ? ? ??CSS可以將文字的粗細(xì)進(jìn)行了細(xì)致的劃分,而且,還可以將本身是粗體的文字,變?yōu)檎5拇旨?xì)顯示。
 
 
 
 
<span style="font-size:24px;"><html><head><title>文字粗細(xì)</title><style><!--
h1 span{font-weight:lighter;}
span{font-size:30px;}
span.one{font-weight:100;}
span.two{font-weight:200;}
span.three{font-weight:300;}
span.four{font-weight:400;}
span.five{font-weight:500;}
span.sex{font-weight:600;}
span.seven{font-weight:700;}
span.eight{font-weight:800;}
span.nine{font-weight:900;}
span.ten{font-weight:bold;}
span.eleven{font-weight:normal;}
--></style></head><body><h1>文字<span>粗</span>體</h1><span class="one">文字粗細(xì):100</span><span class="two">文字粗細(xì):200</span><span class="three">文字粗細(xì):300</span><span class="four">文字粗細(xì):400</span><span class="five">文字粗細(xì):500</span><span class="six">文字粗細(xì):600</span><span class="seven">文字粗細(xì):700</span><span class="eight">文字粗細(xì):800</span><span class="nine">文字粗細(xì):900</span><span class="ten">文字粗細(xì):bold</span><span class="eleven">文字粗細(xì):normal</span></body>
</html>
</span>
  
 
? ? ? ? ??文字的粗細(xì)在CSS中通過(guò)屬性:font-weight設(shè)置,如上代碼幾乎涵蓋了所有的文字粗細(xì)值,并且,可以是本身是粗體的字體,變成正常粗體。
 
?
                            總結(jié)
                            
                                以上是生活随笔為你收集整理的CSS设置文字粗细的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
                            
                            
                                如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。