Home >Web Front-end >CSS Tutorial >CSS to achieve line spacing effect_Experience exchange

CSS to achieve line spacing effect_Experience exchange

PHP中文网
PHP中文网Original
2016-05-16 12:07:471674browse

css to achieve line spacing effect_experience exchange

the definition of line spacing in css is:

line-height:18px;

the above code sets the line spacing is 18px. for a long time, when i defined the font style, it was usually like this:

#myfont{ 
       font:12px tahoma; 
       line-height:18px; 
}

i just discovered today that it can be written in one line and modified as follows:

#myFont{ 
      font:12px/18px tahoma; 
}

the above is the css achieve line spacing effect_experience exchange content, for more related content, please pay attention to the php chinese website (www.php.cn)!


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