How to add borders or font amplification effects to text in css (detailed code explanation)

奋力向前
Release: 2021-08-06 10:11:33
Original
5414 people have browsed it

In the previous article " Teach you step by step how to use css3 to add shadow effects to text (detailed code explanation)", I introduced you how to use cs3 to add shadow effects to text. The following article will introduce to you how to use CSS to add borders or font amplification effects to text. Let’s see how to do it together.

How to add borders or font amplification effects to text in css (detailed code explanation)

How to add borders or enlarge fonts to text using css

Text borders

p{ border:2px solid blue;}
Copy after login

Text border code example

 文字边框  

中文网1

中文网2

中文网3

Copy after login

Code rendering

How to add borders or font amplification effects to text in css (detailed code explanation)

Font enlargement

Select all

elements by element name p

p{}
Copy after login

pSpecify style rules

p {font-size:200%;} 将字体放大1倍
Copy after login

Font amplification code example

    文字边框  

php中文网

php中文网

php中文网

php中文网

Copy after login

Font amplification code rendering

How to add borders or font amplification effects to text in css (detailed code explanation)

If you want all paragraphs to have a gray background , use the element selector

to define

p{background:lightgray;} 选中所有的

设置背景色:亮灰色。

Copy after login

Code example

    文字边框  

php中文网

php中文网

php中文网

php中文网

Copy after login

Code rendering

How to add borders or font amplification effects to text in css (detailed code explanation)

Recommended learning: CSS video tutorial

The above is the detailed content of How to add borders or font amplification effects to text in css (detailed code explanation). For more information, please follow other related articles on the PHP Chinese website!

Related labels:
css
source:php.cn
Statement of this Website
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
Latest Articles by Author
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!