<style>
div{
width: 600px;
height: 250px;
background: url(../0511/image/bottom-bg.jpg) no-repeat;
border: 1px solid #ccc;
}
#example1{box-shadow: 5px 10px ;}
/* ์ ๋ณ๊ฒฝ */
#example2{box-shadow: 5px 10px #888;}
/* ๊ทธ๋ฆผ์ ๋ฒ์ง๊ธฐ */
#example3{box-shadow: 5px 10px 10px skyblue;}
/* ๊ทธ๋ฆผ์ ์ค์ฒฉ ๊ฐ๋ฅ, ์ฝค๋ง๋ฅผ ์ฌ์ฉ */
#example4{
box-shadow: 2px 2px 2px black,
0 0 25px blue;
}
#example5{box-shadow: 5px 5px 5px 5px rgb(202, 202, 202) inset;}
</style>
box-shadow
๊ฐ๋ก | ์ธ๋ก | ๋ฒ์ง | ์
<body>
<div id="example1"></div>
<br><br>
<div id="example2"></div>
<br><br>
<div id="example3"></div>
<br><br>
<div id="example4"></div>
<br><br>
<div id="example5"></div>
<br><br>
</body>
<style>
table{
/* border: 1px solid blue; */
border-collapse: collapse; /*ํ ๋ผ์ธ ํฉ์น๊ธฐ*/
}
td, th{
/* border: 1px dotted green; */
width: 100px;
height: 20px;
padding: 10px;
text-align: left;
}
thead, tfoot{
background: darkgrey;
color:aliceblue;
}
td, tfoot th{border-bottom: 1px solid darkgray;}
tbody tr:nth-child(2n){background: aliceblue;}
tbody tr:hover{background: pink;}
caption{
caption-side: top;
line-height: 2;
}
</style>
border
๊ตต๊ธฐ | ์ ์์ฑ | ์์
<body>
<table>
<caption>1 ํ๊ธฐ ์ฑ์ </caption>
<thead>
<tr>
<th>์ด๋ฆ</th>
<th>HTML</th>
<th>CSS</th>
</tr>
</thead>
<tbody>
<tr>
<td>์ฌ๊ณผ</td>
<td>80</td>
<td>70</td>
</tr>
<tr>
<td>๋ฐ๋๋</td>
<td>90</td>
<td>60</td>
</tr>
<tr>
<td>๋ธ๊ธฐ</td>
<td>70</td>
<td>75</td>
</tr>
<tr>
<td>์ฌ๊ณผ</td>
<td>80</td>
<td>70</td>
</tr>
<tr>
<td>๋ฐ๋๋</td>
<td>90</td>
<td>60</td>
</tr>
<tr>
<td>๋ธ๊ธฐ</td>
<td>70</td>
<td>75</td>
</tr>
</tbody>
<tfoot>
<tr>
<th>ํฉ๊ณ</th>
<th>300</th>
<th>270</th>
</tr>
</tfoot>
</table>
</body>
<style>
input[type=text]{color: red;}
input:hover, textarea:hover{background-color: aliceblue;}
input[type=text]:focus, input[type=email]:focus{font-size: 120%;}
label{
display: block; /*์์ฑ ๋ณ๊ฒฝ*/
padding: 5px;
}
label span{
display: inline-block; /*์ธ๋ผ์ธ+๋ธ๋ญ ์์ฑ */
width: 90px;
text-align: right;
padding: 10px;
}
</style>
<body>
<h3>CONTACT US</h3>
<hr>
<form>
<label>
<span>Name</span><input type="text">
</label>
<label>
<span>Email</span><input type="email" placeholder="abc@mail.com">
</label>
<label>
<span>Commet</span>
<textarea row="5" cols="40" placeholder="๋ฉ์ธ์ง๋ฅผ ๋จ๊ฒจ์ฃผ์ธ์"></textarea>
</label>
<label>
<input type="submit" value="์ ์ก">
</label>
</form>
</body>
<style>
.origin{
width: 200px;
height: 134px;
border: 1px solid black;
margin: 40px;
perspective: 200px; /*์๊ทผ๊ฐ*/
}
/* ์ด๋ฏธ์ง ์ด๋ */
.movex:hover{
/* ๋ค๋ฅธ ์น์ฌ์ดํธ ํ์ํธํ์ ์ํด์ ์จ์ค๋ค */
-webkit-transform: translateX(50px);
-ms-transform: translateX(50px);
-moz-transform: translateX(50px);
-o-transform: translateX(50px);
transform: translateX(50px);
}
.movey:hover{transform: translateY(50px);}
.movexy:hover{ transform: translate(10px, 20px);}
/* ์ด๋ฏธ์ง ํ๋, ์ถ์(์์์ ์ฌ์ฉ, -๋ ๋ฐฉํฅ ๋ณ๊ฒฝ) */
.scalex:hover{transform: scaleX(1.5);}
.scaley:hover{transform: scaleY(1.5);}
.scalexy:hover{transform: scale(2,2);}
/* ๊ธฐ์ธ์ - ๊ฐ๋ */
.skewx:hover{transform: skewX(10deg);}
.skewy:hover{transform: skewY(20deg);}
.skewxy:hover{transform: skew(30deg, -30deg);}
/* ํ์ */
.rot:hover{transform: rotate(20deg);}
/* 3์ฐจ์ */
.rotx:hover{transform: rotateX(45deg);}
.roty:hover{transform: rotateY(45deg);}
.rotz:hover{transform: rotateZ(45deg);}
.rotxyz:hover{transform: rotate3d(2.5, 1.2, -1.5, 45deg);}
</style>
3์ฐจ์ ๊ฒฝ์ฐ perspective: ์๊ทผ๊ฐ ๊ฐ์ด ์์ด์ผ ํจ.
<body>
<p>์ด๋ฏธ์ง ์ด๋</p>
<div class="origin">
<div class="movex">
<img src="./img/bus.jpg">
</div>
</div>
<div class="origin">
<div class="movey">
<img src="./img/bus.jpg">
</div>
</div>
<div class="origin">
<div class="movexy">
<img src="./img/bus.jpg">
</div>
</div>
<p>์ด๋ฏธ์ง ํ๋, ์ถ์(์์์ ์ฌ์ฉ, -๋ ๋ฐฉํฅ ๋ณ๊ฒฝ)</p>
<div class="origin">
<div class="scalex">
<img src="./img/bus.jpg">
</div>
</div>
<div class="origin">
<div class="scaley">
<img src="./img/bus.jpg">
</div>
</div>
<div class="origin">
<div class="scalexy">
<img src="./img/bus.jpg">
</div>
</div>
<p>๊ธฐ์ธ์ - ๊ฐ๋ </p>
<div class="origin">
<div class="skewx">
<img src="./img/bus.jpg">
</div>
</div>
<div class="origin">
<div class="skewy">
<img src="./img/bus.jpg">
</div>
</div>
<div class="origin">
<div class="skewxy">
<img src="./img/bus.jpg">
</div>
</div>
<p>ํ์ </p>
<div class="origin">
<div class="rot">
<img src="./img/bus.jpg">
</div>
</div>
<p>3์ฐจ์</p>
<div class="origin">
<div class="rotx">
<img src="./img/bus.jpg">
</div>
</div>
<div class="origin">
<div class="roty">
<img src="./img/bus.jpg">
</div>
</div>
<div class="origin">
<div class="rotz">
<img src="./img/bus.jpg">
</div>
</div>
<div class="origin">
<div class="rotxyz">
<img src="./img/bus.jpg">
</div>
</div>
</body>
<style>
.origin{
width: 200px;
height: 134px;
border: 1px solid black;
margin: 40px;
perspective: 200px; /*์๊ทผ๊ฐ*/
}
.bus{transform: rotatez(10deg);}
/* ์ด๋ฏธ์ง ๋ณํ ์์์ ์ง์ ํ๊ธฐ */
.ltop .bus{transform-origin: left top;}
.rtop .bus{transform-origin: right top;}
.lbottom .bus{transform-origin: left bottom;}
.rbottom .bus{transform-origin: right bottom;}
</style>
<div class="origin">
<div class="ltop">
<img src="./img/bus.jpg" class="bus">
</div>
</div>
<div class="origin">
<div class="rtop">
<img src="./img/bus.jpg" class="bus">
</div>
</div>
<div class="origin">
<div class="lbottom">
<img src="./img/bus.jpg" class="bus">
</div>
</div>
<div class="origin">
<div class="rbottom">
<img src="./img/bus.jpg" class="bus">
</div>
</div>
<style>
h1{font-size: 60px;}
div{
width: 200px;
height: 200px;
}
.container{
border: 1px solid black;
perspective: 300px; /*์๊ทผ๊ฐ*/
margin-top: 100px;
margin-left: 100px;
float: left;
}
.box{
background-color: aquamarine;
transform: rotateY(135deg);
}
/* ๋ท ๋ฉด ๋ณด์ผ๋ ๋ง๋ */
#back1{backface-visibility: hidden;}
#back2{backface-visibility: visible;}
</style>
<body>
<div class="container">
<div class="box" id="back1">
<h1>Back1</h1>
</div>
</div>
<div class="container">
<div class="box" id="back2">
<h1>Back1</h1>
</div>
</div>
</body>
<style>
/* ์ ํ ํ๋กํผํฐ, ์ ํ์๊ฐ */
span{transition: font-size 3s;}
span:hover{font-size: 500%;}
</style>
<body>
<p><span>๊ฝ!</span>๊ธ์์ ๋ง์ฐ์ค๋ฅผ ์ฌ๋ ค๋ณด์ธ์</p>
</body>