2、阴影 - HTML5&CSS3.0基础部分-xyphf

1.盒子阴影

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>盒子阴影</title>
<style>
#div1{margin:100px;width:200px;height:200px;background:#ccc;

            /*x轴偏移 y轴偏移 blur模糊度 拓展半径 color*/
    box-shadow: 10px   20px   10px        100px   red;
}
</style>
</head>
<body>
    <div id="div1"></div>
</body>
</html>

2.盒子内阴影

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>盒子阴影多个</title>
<style>
#div1{margin:100px;width:200px;height:200px;background:#ccc;
    border:10px dashed #000;
    box-shadow: 
                inset 10px 0 red,
                inset 0 10px green,
                inset -10px 0 yellow,
                inset 0 -10px blue,

                20px 0 yellow,
                0 20px blue,
                -20px 0 green,
                0 -20px pink;

}
</style>
</head>
<body>
    <div id="div1"></div>
</body>
</html>

3.盒子阴影多个_1

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>盒子阴影多个</title>
<style>
#div1{margin:100px;width:200px;height:200px;background:#ccc;

    box-shadow: 
                10px 0 red,
                0 10px green,
                -10px 0 yellow,
                0 -10px blue,

                20px 0 yellow,
                0 20px blue,
                -20px 0 green,
                0 -20px pink;
    border-radius:50%;
}
</style>
</head>
<body>
    <div id="div1"></div>
</body>
</html>

4.盒子阴影多个_2

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>盒子阴影多个</title>
<style>
#div1{margin:100px;width:200px;height:200px;background:#ccc;

    box-shadow: 
                10px 0 red,
                0 10px green,
                -10px 0 yellow,
                0 -10px blue,

                20px 0 yellow,
                0 20px blue,
                -20px 0 green,
                0 -20px pink;
}
</style>
</head>
<body>
    <div id="div1"></div>
</body>
</html>

5.文字阴影

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
<style>
span{border:1px solid red;font-size: 30px;
            /*x轴偏移 y轴偏移 blur模糊度 颜色*/
    text-shadow: 1px 2px 2px 100px red;
}
</style>
</head>
<body>
<span>徐玉朋</span>
</body>
</html>

6.文字阴影多个

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
<style>
span{position:absolute;left:300px;top:300px;border:1px solid red;
    font-size: 30px;
    text-shadow: 
    200px 0 red,
    0 200px pink,
    -200px 0 yellow,
    0 -200px green;
}
</style>
</head>
<body>
    <span>徐玉朋</span>
</body>
</html>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值