CSS样式之文字属性

字体属性

文本属性呢,自我认为就是写文档的一些格式属性,例如:字体颜色,字体加粗,字体大小,字体类型等,而且我们在输出测试用例报告的时候也可以用到这些属性,对测试报告进行优化。

<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>字体属性</title>
    <style>
        .box{
            /*字体颜色*/
            color: red;
            /*字体加粗*/
            font-weight:bold ;
            /*font-weight: normal;*/
            /*font-weight: 700;*/
            /*font-weight: bolder;*/
            /*font-weight: lighter;*/

            /*字体大小*/
            font-size: 20px;

            /*字体类型*/
            font-style: italic;

            /*字体*/
            font-family: 幼圆,楷体,微软雅黑;
        }
        h1{
            /*font-weight: normal;*/
        }
    </style>
</head>
<body>
<div class="box">小测试</div>
<h1>一号标题</h1>
</body>
</html>
text属性
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>text属性</title>
    <style>
        .box{
            /*内容水平对齐方式*/
            /*text-align: right;*/
            text-align: center;

            /*加下划线*/
            text-decoration: underline;
        }
        a{
            font-size: 26px;
            /*去下划线*/
            /*text-decoration: none;*/


            /*了解*/

            /*删除线*/
            /*text-decoration: line-through;*/

            /*text-decoration: overline;*/
        }
        p{
            /*全部转换为大写*/
            /*text-transform: uppercase;*/
            /*全部转换为小写*/
            /*text-transform: lowercase;*/
            /*每个单词首字母大写*/
            /*text-transform: capitalize;*/
        }
        .two{
            font-size: 20px;
            /*首行缩进*/
            text-indent: 40px;
        }
    </style>
</head>
<body>
<div class="box">
    今天不加班
    <br/>
    <img src="images/pic2.jpeg" alt=""/>
</div>
<a href="#">超链接</a>

<p>
    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Autem cum deserunt dignissimos, hic officiis praesentium ullam! Ab dolorem doloribus ea et harum mollitia neque optio suscipit tempora temporibus, vel voluptas!
</p>
<div class="two">
    学习强国
    小测试
    接口自动化
    APP自动化
</div>
</body>
</html>
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值