02CSS文本样式应用09

本文介绍了一个使用CSS进行文本样式的实战案例,展示了如何通过不同属性调整字体大小、颜色、粗细、斜体、下划线及字母间距等,实现美观且易读的文字布局。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

day09

CSS文本样式应用

  经验技巧:
    1.网页制作从整体到局部
    2,借助手册和网络

案例:

 1 <!DOCTYPE html>
 2 <html lang="en">
 3 <head>
 4     <meta charset="UTF-8">
 5     <title>文字属性</title>
 6     <style type="text/css">
 7         p{
 8             height: 150px;
 9             background-color: #ececec;
10             text-align: center;
11             line-height: 150px;
12             font-family: Georgia;;
13         }
14         .one{
15             font-size: 80px;
16             color: red;
17             font-weight: bold;
18         }
19         .two{
20             font-size: 40px;
21             text-decoration: underline;
22             color: gray;
23             vertical-align: 15px;
24             letter-spacing: 5px;
25         }
26         .three{
27             font-size: 80px;
28             color: gray;
29             font-style: oblique;
30         }
31     </style>
32 </head>
33 <body>
34     <p>
35         <span class="one">慕课网</span>&nbsp;&nbsp;
36         <span class="two">只学有用的</span>
37         <span class="three"></span>
38     </p>
39 </body>
40 </html>

图示:

 

转载于:https://www.cnblogs.com/shink1117/p/8422341.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值