css3的 边框 圆角 背景

边框

border-radius :"10px 20px 30px 40px"  左上 右上 右下 左下

border-radius :"10px 20px 30px" 左上 (右上 左下)右下

border-radius :"10px 20px” (左上右下) (右上 左下)

border-radius :"10px / 20px”  (椭圆的:x轴半径  y轴半径)

盒阴影   box-shadow

box-shadow :"水平位置 垂直位置 模糊度(阴影距离 阴影的大小)阴影的颜色 (内外阴影 inset), "水平位置 垂直位置 模糊度(阴影距离 阴影的大小)阴影的颜色 (内外阴影 inset)"

设置两个阴影可以用逗号隔开

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .div1 {
            width: 200px;
            height: 200px;
            background-color: red;
            border-radius: 50%;
            box-shadow: 20px 10px 20px #555 inset, 5px 5px 5px #555;
        }
    </style>
</head>

<body>
    <div class="div1">
        
    </div>
</body>

</html>

边界图片

 border:"15px solid transpar"  设置一个透明的边框

background-size 设置背景图片的大小  contain属性是等比变大 cover依照宽度或高度变大不是等比变大

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .div12,
        .div13,
        .div14 {
            margin-top: 20px;
            width: 300px;
            height: 300px;
            float: left;
            border: 30px solid rgba(255, 0, 0, 0.179);
            margin-right: 20px;
            padding: 20px;
        }
        
        .div12 {
            background: rgba(255, 0, 0, 0.475);
            background-clip: border-box;
        }
        
        .div13 {
            background: rgba(255, 0, 0, 0.475);
            background-clip: padding-box;
        }
        
        .div14 {
            background: rgba(255, 0, 0, 0.475);
            background-clip: content-box;
        }
    </style>
</head>

<body>
    <div class="div12">
        <p>今天是个好日子今天是个好日子今天是个好日子今天是个好日子今天是个好日子今天是个好日子今天是个好日子今天是个好日子今天是个好日子</p>
        <p>今天是个好日子今天是个好日子今天是个好日子今天是个好日子今天是个好日子今天是个好日子今天是个好日子今天是个好日子今天是个好日子</p>

    </div>
    <div class="div13">
        <p>今天是个好日子今天是个好日子今天是个好日子今天是个好日子今天是个好日子今天是个好日子今天是个好日子今天是个好日子今天是个好日子</p>
        <p>今天是个好日子今天是个好日子今天是个好日子今天是个好日子今天是个好日子今天是个好日子今天是个好日子今天是个好日子今天是个好日子</p>

    </div>
    <div class="div14">
        <p>今天是个好日子今天是个好日子今天是个好日子今天是个好日子今天是个好日子今天是个好日子今天是个好日子今天是个好日子今天是个好日子</p>
        <p>今天是个好日子今天是个好日子今天是个好日子今天是个好日子今天是个好日子今天是个好日子今天是个好日子今天是个好日子今天是个好日子</p>
    </div>
</body>

</html>

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值