λ°μν
쑰건) μ΄λ―Έμ§ μ΅μ 3μ₯ μ΄μ. ν μ€νΈ: νμ’ , μ±λ³, λμ΄, λΆμκ°
β
β
<λ΄κ° ν κ²>
<μμ€>
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>κ³ μμ΄ λΆμ</title>
<style>
* {
margin: 0; /* μΈλΆ μ¬λ°± */
padding: 0; /* ν
λ리μ λ΄μ© μ¬μ΄μ μ¬λ°± */
box-sizing: border-box;
}
#container {
width: 100%; /* λλΉ */
}
header {
width: 100%; /* λλΉ */
height: 80px; /* λμ΄ */
margin: 0; /* μΈλΆ μ¬λ°± */
}
a {
text-decoration: none; /* κΈμ κΎΈλ° */
}
nav {
height: 50px; /* λμ΄ */
background:skyblue; /* λ°°κ²½ μ */
}
#main-nav {
list-style: none;
margin-bottom: 10px;
padding: 10px; /* ν
λ리μ λ΄μ© μ¬μ΄μ μ¬λ°± */
text-align: center;
}
#main-nav li {
display: inline-block;
color: #fff;
font-family: "λ§μ κ³ λ", λμ;
font-size: 0.9em;
margin: 5px 15px; /* μΈλΆ μ¬λ°± */
}
nav a:link, a:visited {
color: #fff;
}
nav > ul > li {
width: 15%; /* λλΉ */
height: 40px; /* λμ΄ */
margin-top: 30px; /* μμ μ£Όλ³ μ¬λ°± */
position:relative; /* μλ μμ μ΄ μμ΄μΌλ μμΉλ₯Ό κΈ°μ€μΌλ‘ λ°°μΉ */
float:center; /* μ λ ¬ */
}
nav > ul > li > a {
display: block; /* νν */
width: 25%px; /* λλΉ */
height: 40px; /* λμ΄ */
text-align: center; /* κ°μ΄λ° μ λ ¬ */
line-height: 40px; /* μ€ κ°κ²© */
font-size: 18px; /* κΈμ ν¬κΈ° */
color:black /* κΈμ μ */
}
nav > ul > li > a:hover {
background-color: gray;
color: floralwhite;
}
#menus {
width: 100%; /* λλΉ */
}
#menus > div {
height: 400px; /* λμ΄ */
margin-bottom: 10px; /* μμ μ£Όλ³ μ¬λ°± */
position: relative;
}
#menu1, #menu2, #menu3, #menu4, #menu5 {
width: 100%; /* λλΉ */
}
#menus h4 {
position: absolute;
padding: 5px; /* ν
λ리μ λ΄μ© μ¬μ΄μ μ¬λ°± */
font-size: 20px;
color:white;
text-shadow: 3px 3px 5px black;
right: 3%;
bottom: 10px;
}
#menu1 {
background:url("cat1.png") no-repeat center;
background-size: cover;
}
#menu2 {
background:url("cat2.png") no-repeat center;
background-size: cover;
}
#menu3 {
background:url("cat3.png") no-repeat center;
background-size: cover;
}
#menu4 {
background:url("cat4.png") no-repeat center;
background-size: cover;
}
#menu5 {
background:url("cat5.png") no-repeat center;
background-size: cover;
}
footer {
width: 100%; /* λλΉ */
background:#373737; /* λ°°κ²½ μ */
height: 200px; /* λμ΄ */
}
footer p {
font-size: 1.2em; /* κΈμ ν¬κΈ° */
color:#eee; /* μκΉ */
text-align: center; /* κ°μ΄λ° μ λ ¬ */
line-height: 200px; /* μ€ κ°κ²© */
}
@media all and (min-width:768px) {
#menus {
display: flex; /* νλ μλΈ λ°μ€ λ μ΄μμ μ μ© */
-ms-flex-wrap: wrap;
-webkit-flex-wrap: wrap;
flex-wrap: wrap; /* μ¬λ¬ μ€μ κ±Έμ³ νμ */
justify-content: space-between; /* νλ©΄ μμͺ½μ λ°μ§ λΆμ΄κΈ° */
}
#menu1, #menu2, #menu3, #menu4 {
width: 49%; /* λλΉ */
}
#menu5 {
width: 100%; /* λλΉ */
}
}
@media all and (min-width:992px) {
#menu1, #menu2, #menu3, #menu4, #menu5 {
width: 33%; /* λλΉ */
}
#menu5 {
margin-left: 0.5%; /* μμ μ£Όλ³ μ¬λ°± */
-ms-flex: 2 2 0;
-webkit-flex: 2 2 0;
flex: 2 2 0;
}
}
.button {
cursor: pointer;
background: #000; /* λ°°κ²½ */
text-decoration: none; /* κΈμ κΎΈλ° */
color: #666; /* μκΉ */
}
.curl-top-left {
display: inline-block; /* νν */
position: relative; /* μλ μμ μ΄ μμ΄μΌλ μμΉλ₯Ό κΈ°μ€μΌλ‘ λ°°μΉ */
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
transform: translateZ(0);
box-shadow: 0 0 1px rgba(0, 0, 0, 0);
}
β
.curl-top-left:before {
pointer-events: none;
position: absolute;
content: '';
height: 0; /* λμ΄ */
width: 0; /* λλΉ */
top: 0;
left: 0;
background: white; /* λ°°κ²½ */
/* IE9 */
background: linear-gradient(135deg, white 45%, #aaa 50%, #ccc 56%, white 80%);
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#ffffff', endColorstr='#000000');
/*For IE7-8-9*/
z-index: 1000;
box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4); /* λ°μ€ κ·Έλ¦Όμ */
transition-duration: 0.3s;
transition-property: width height;
}
β
.curl-top-left:hover:before {
width: 16px; /* λλΉ */
height: 16px; /* λμ΄ */
}
β
#menu1:hover, #menu2:hover, #menu3:hover, #menu4:hover, #menu5:hover {
opacity: 0.2;
-moz-transform: translateY(0px);
-ms-transform: translateY(0px);
-o-transform: translateY(0px);
-webkit-transform: translateY(0px);
transform: translateY(0px);
}
</style>
</head>
<body>
<div id="container">
<header>
<nav>
<ul id="main-nav">
<li><a href='#'><b>μ¬μ΄νΈ μκ°</b></a></li>
<li><a href='#'><b>κ³ μμ΄ λΆμ</b></a></li>
<li><a href='#'><b>κ³ μμ΄ μλ</b></a></li>
<li><a href='#'><b>κ³ κ°μΌν°</b></a></li>
</ul>
</nav>
</header>
<section id="menus">
<div id="menu1">
<h4>
νμ’
: λ¬μμλΈλ£¨<br>
μ±λ³ : λ¨<br>
λμ΄ : 1μ΄<br>
λΆμκ° : 100λ§μ
</h4>
</div>
<div id="menu2">
<h4>
νμ’
: μλ©λ¦¬μΉΈ μν€μ΄<br>
μ±λ³ : μ¬<br>
λμ΄ : 3κ°μ<br>
λΆμκ° : 50λ§μ
</h4>
</div>
<div id="menu3">
<h4>
νμ’
: μ½λ¦¬μ μν€μ΄<br>
μ±λ³ : λ¨<br>
λμ΄ : 2μ΄<br>
λΆμκ° : 5λ§μ
</h4>
</div>
<div id="menu4">
<h4>
νμ’
: νλ₯΄μμκ³ μμ΄<br>
μ±λ³ : λ¨<br>
λμ΄ : 1μ΄<br>
λΆμκ° : 1000λ§μ
</h4>
</div>
<div id="menu5">
<h4>
νμ’
: λΈλ¦¬ν°μ¬μν€μ΄<br>
μ±λ³ : λ¨<br>
λμ΄ : 1μ΄<br>
λΆμκ° : 20λ§μ
</h4>
</div>
</section>
</div>
</body>
</html>
λ°μν
'HTML5 & CSS3' μΉ΄ν κ³ λ¦¬μ λ€λ₯Έ κΈ
[HTML5 & CSS3] μ€μ΅ - κ³ μμ΄ λΆμ νμ΄μ§ (μ¬ν) (0) | 2021.02.15 |
---|---|
[HTML5 & CSS3] μ€μ΅ - κ³ μμ΄ μλ νμ΄μ§ λ§λ€κΈ° (0) | 2021.02.15 |
[HTML5 & CSS3] κ³Όμ (0) | 2021.02.15 |
[HTML5 & CSS3] νλ μ€ λ°μ€ νλͺ© λ°°μΉλ₯Ό μν μμ±λ€ (2) | 2021.02.15 |
[HTML5 & CSS3] νλ μ€ λ°μ€ λ μ΄μμ (0) | 2021.02.14 |
λκΈ