CSS盒子模型

盒子模型

margin: 外边距

margin-topmargin-rightmargin-bottommargin-left

使用方式:

(1)margin30px;表示上下左右外边距都留白30px

(2)margin-left30px;单独设置上下左右外边距

(3)margin10px 20px 30px 40px;分别设置上下左右四个外边距为10px 20px 30px 40px

<styletype="text/css">
    div{
        width: 200px;
        height: 200px;
        background-color:maroon;
        margin: 10px 20px30px40px;
    }
</style>

 

padding:内边距

也有上下左右边距,和margin类似。


border:边框

solid 实线

double 双实线

dotted 点虚线

dashed 虚线

border-width 边框宽度

border-style  边框样式

border-color  边框颜色

word中设置边框的操作

也可以使用更优化的书写方式

border10px dashed blue


outline: 轮廓线

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值