css常用样式

1.

       font-size: 50px;   /*px像素*/

        font-family: 宋体;  /*字体类型*/

        font-weight: normal;  /*字体粗细*/

        text-align: center;  /*位置,居中、左对齐、右对齐*/

        text-indent: 2em;    /*段落首行缩进,em相对单位,总是等于本元素的字体大小*/

        line-height: 100px;

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>css样式</title>

    <!--style是一个特殊的标签,只能写css代码,-->
    <style>
        /*
        一个css规则分两部分:1.选择器 2.样式列表
        样式列表写在{...}里边
        */
    h2{
        color:aqua;
        font-size:150px;
    }

    p{
        color:aquamarine;
        font-size:100px;
    }

    body{
        background-color: rgb(218, 140, 24);
        background-image: url(timg.jpg);
        background-size: 100%;
    }
    </style>
</head>
<body>
    
    <h1 style="color: red; font-size:100px">智能教育</h1>
    <h2>标题</h2>
    <p>副标题</p>
    

</body>
</html>

2.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>css常用样式</title>

    <style>
    p{
        font-size: 50px;   /*px像素*/

        font-family: 宋体;  /*字体类型*/

        font-weight: normal;  /*字体粗细*/

        text-align: center;  /*位置,居中、左对齐、右对齐*/

        text-indent: 2em;    /*段落首行缩进,em相对单位,总是等于本元素的字体大小*/

        line-height: 100px;
    }

    </style>
</head>
<body>

    <p>css里的常用样式,1231231321231321321321321321321321321321</p>
    
</body>
</html>

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值