مهمة صفحة التنسيقات الخارجية
كود HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Store</title>
<link href="https://fonts.googleapis.com/css?family=Domine" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Questrial" rel="stylesheet">
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1><a href="index.html">Store</a></h1>
</header>
<main>
<h2>Featured Products</h2>
<p>Refresh your look with pieces of our collection</p>
<div>
<img src="https://demos.coretabs.net/frontend-basics-workshop/img/img1.jpg" alt="photo1">
<img src="https://demos.coretabs.net/frontend-basics-workshop/img/img2.jpg" alt="photo2">
<img src="https://demos.coretabs.net/frontend-basics-workshop/img/img3.jpg" alt="photo3">
<img src="https://demos.coretabs.net/frontend-basics-workshop/img/img4.jpg" alt="photo4">
<img src="https://demos.coretabs.net/frontend-basics-workshop/img/img5.jpg" alt="photo5">
<img src="https://demos.coretabs.net/frontend-basics-workshop/img/img6.jpg" alt="photo6">
<img src="https://demos.coretabs.net/frontend-basics-workshop/img/img7.jpg" alt="photo7">
<img src="https://demos.coretabs.net/frontend-basics-workshop/img/img8.jpg" alt="photo8">
<img src="https://demos.coretabs.net/frontend-basics-workshop/img/img9.jpg" alt="photo9">
</div>
<a href="product.html">More products</a>
</main>
<footer>
<p>© 2019 All Right Reserved</p>
</footer>
</body>
</html>
كود CSS
body{
margin: 0;
font-family: 'Questrial', sans-serif;
}
header{
height: 80px;
border-bottom: 1px dotted #666666;
}
header h1 {
text-align: center;
font-family: 'Domine', serif;
font-size: 24px;
letter-spacing: 6px;
line-height: 80px;
margin: 0;
text-decoration: none;
}
header h1 a{
color: #222;
text-decoration: none;
text-transform: uppercase;
}
main{
max-width: 960px;
text-align: center;
margin: 90px auto 90px auto;
}
main h2{
font-size: 30px;
font-weight: normal;
margin: 0;
}
main p{
color: #999;
font-size: 18px;
}
main div{
margin: 60px 0 60px 0;
}
main img {
margin: 10px;
width: 290px;
height: 335px;
box-sizing:border-box;
transition-duration: .4s;
}
main img:hover {
padding: 28px;
background-color: #ddd;
}
main a{
width: 160px;
height: 40px;
display: block;
margin: 0 auto 0 auto;
line-height: 40px;
text-decoration: none;
font-size: 18px;
border: 2px solid #ccc;
color: #ccc;
transition-duration: .4s;
}
main a:hover{
background-color: #222;
color: #fff;
border-color: #222;
}
footer{
background-color:#222;
height: 50px;
color: #999;
text-align: center;
line-height: 50px;
}