IT/Css

css3 - :hover 활용, 이미지 테두리 만들기, text-shadow와 box-shadow

노마드오브 2018. 8. 21. 23:49

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>:hover 활용</title>

<style>

div {

width : 100px;

height : 140px;

background-image : url("../media/back.png");

background-size : 100px 140px;

}

div#img:hover {

background-image : url("../media/spade-7.png");

}

</style>

</head>

<body>

<h3>:hover 활용</h3>

<hr>

<table>

<tr><td>마우스를 올리면 카드의 앞면이 보인다.</td>

<td><div id="img"></div></td></tr></table>

</body>

</html>




<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title></title>

<style>

img {

padding : 5px;

border : 15px solid grey;

border-image : url("../media/checkpattern.png") 30 round;

}


</style>

</head>

<body>

<h3>이미지 테두리 만들기</h3>

<hr>

<img src="../media/sunset.png" width="150" height="100"> 

</body>

</html>




<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>text-shadow와 box-shadow</title>

<style>

h2:active {

text-align : center;

color : yellow;

text-shadow : 2px 2px 3px blue;

}

img:hover {

box-shadow : 0px 0px 5px blue;

}

</style>

</head>

<body>

<h2>Most Visited Pages</h2>

<hr>

<table>

<tr>

<td><a href="http://www.naver.com">

<img src="../media/naver.png" width="120" height="100">

</a></td>

<td><a href="http://www.chosun.com">

<img src="../media/chosun.png" width="120" height="100">

</a></td>

<td><a href="http://www.amazon.com">

<img src="../media/amazon.png" width="120" height="100">

</a>

</td>

</tr>

</table>

</body>

</html>