Heim  >  Artikel  >  Web-Frontend  >  CSS如何设置文字之间的间隔_html/css_WEB-ITnose

CSS如何设置文字之间的间隔_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:30:591816Durchsuche

CSS如何设置文字之间的间隔:
在通常情况下都是使用文字的默认间距,但是有时候也要认为的设置文字之间的间距,下面就通过实例代码介绍一下如何实现此效果,代码如下:

 

<!DOCTYPE html><html><head><meta charset=" utf-8"><meta name="author" content="http://www.softwhy.com/" /><title>蚂蚁部落</title><style type="text/css">.txt{  letter-spacing:40px;}</style></head><body><div class="txt">蚂蚁部落欢迎您</div></body></html>

 

以上代码实现了我们的要求,使用letter-spacing属性即可实现,关于此属性可以参阅CSS的letter-spacing属性一章节。 

原文地址是:http://www.softwhy.com/forum.php?mod=viewthread&tid=11523

更多内容可以参阅:http://www.softwhy.com/divcss/

 

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn