значения свойства:
* {
margin
:
0
;
padding
}
.main {
height
600px
width
900px
position
absolute
top
50%
left
margin-top
-300px
margin-left
-450px
.wrapper {
25%
100%
float
#div
1
, #div
2
3
4
{
150px
relative
-75px
background-color
#3BA9DE
box-shadow:
15px
#7092BE
25px
5px
10px
inset
* { margin: 0; padding: 0; } .main { height: 600px; width: 900px; position: absolute; top: 50%; left: 50%; margin-top: -300px; margin-left: -450px; } .wrapper { width: 25%; height: 100%; float: left; } #div1, #div2, #div3, #div4 { height: 150px; width: 150px; float: left; position: relative; top: 50%; left: 50%; margin-top: -75px; margin-left: -75px; background-color: #3BA9DE; } #div1 { box-shadow: 15px 15px #7092BE; } #div4 { box-shadow: 25px 25px 5px 10px #7092BE inset; }
<!DOCTYPE html>
<
html
>
head
meta
charset
=
"utf-8"
/>
title
>New Page</
link
href
"css/style.css"
rel
"stylesheet"
script
type
"text/javascript"
src
"https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"
></
</
body
div
class
"main"
"wrapper"
id
"div1"
"div2"
"div3"
"div4"
/*JavaScript*/
document.getElementById("div2").style.boxShadow = "25px 25px 5px #7092BE";
/*jQuery*/
$(document).ready(function () {
$("#div3").css({ "box-shadow": "25px 25px 5px 10px #7092BE" });
});