Skip to content

Commit 56c5910

Browse files
committed
box-shadow
1 parent 0a87281 commit 56c5910

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

Lecture04/box-shadow/index.html

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
7+
<title>Document</title>
8+
<link rel="stylesheet" href="style.css">
9+
</head>
10+
<body>
11+
<div id="box">
12+
Click Me!
13+
</div>
14+
</body>
15+
</html>

Lecture04/box-shadow/style.css

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#box {
2+
margin: 50px;
3+
padding: 10px;
4+
height: 100px;
5+
width: 300px;
6+
background-color: darkcyan;
7+
color: white;
8+
box-shadow: -5px -5px 5px darkslategray;
9+
font-size: 25pt;
10+
}
11+
12+
#box:hover {
13+
transform: translate(-10px, -10px);
14+
box-shadow: 15px 15px 8px darkslategray;
15+
transition: 0.5s;
16+
}
17+
18+
#box:active {
19+
transform: translate(3px, 3px);
20+
box-shadow: 2px 2px 3px darkslategray;
21+
transition: 0.2s;
22+
}

0 commit comments

Comments
 (0)