赢在职场-WEB全栈开发-1-6padding

<!doctype html>

<html>

    <head>

        <title>抬头</title>

        <meta charset="utf-8">

        

        <style>

            .InternalStyle1

            {

                width:300px;

                height:300px;

                border: purple 30px solid;

                background:green center bottom no-repeat url("dragon.png");

                padding-top: 100px;//盒子中的内容距离顶部30px,盒子也变大了,称为内边距;

                //padding:top right bottom left;//具有顺序的复合属性。上右下左,按顺时针方向。

                //padding:20px;//上右下左全是20px

            }

        </style>

        

        

        <link href = "main.css" rel = "stylesheet">

    </head>

    <body>

        <!属性:属性值(属性单位)>

        <div style = "width:300px;height:100px;background:red">inline style1 行内样式1</div>

        

        <div class = "InternalStyle1">Internal Style1 内部样式1</div>

        

        <div class = "ExternalStyle1">External Style1 外部样式1</div>

    </body>

</html>


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值