css3box-shadow

技術小牛人發表於2017-11-20

程式碼塊

html頁面:

<!DOCTYPE html>

<html>

<head>

<meta charset=”utf-8″>

<meta http-equiv=”X-UA-Compatible” content=”IE=edge”>

<title>box-shadow</title>

</head>

<body>

<div class=”bottom”></div>

<div class=”right”></div>

<div class=”top”></div>

<div class=”left”></div>

</body>

</html>


css樣式:

<style type=”text/css” media=”screen”>

div{

width: 300px;

height: 100px;

margin:50px;

}

.left{

background-color: #006400;

box-shadow: 10px 10px 5px #888;

}


.top{

background-color: #DC143C;

box-shadow: #888 10px 5px 10px;

}


.right{

background-color: #FF1493;

box-shadow: 10px #888 5px 10px;

}


.bottom{

background-color: #08B;

box-shadow: 10px 10px #888 5px;

}

</style>

本文轉自  素顏豬  51CTO部落格,原文連結:http://blog.51cto.com/suyanzhu/1883411