Home  >  Article  >  Web Front-end  >  CSS如何设置文字之间的间隔_html/css_WEB-ITnose

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

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

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/

 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn