Bài 12 cắt giao diện web bằng photoshop phần 1 - chuyển psd sang html và css

 




1 - Hình ảnh




















2 - html


<html>
<head><title>mobile blog</title>
<link rel="stylesheet" type="text/css" href="style.css"/>
</head>
<body>
<div id="wrapper">

<header>
<div id="logo">
<img src="hinhanh/logo.png"/>
</div>
<ul>
<li>Home</li>
<li>Services</li>
<li>FAQ's</li>
<li>Reviews</li>
<li>Contacts</li>
</ul>
</header ><!--end header-->


<section>
<aside>
<div class="col_left">

<div class="header_col_left">
<img src="hinhanh/category_icon.png"/>
<div class="title_left">Categories</div>
</div><!--end header_col_left-->

<div id="ds_left">
<div>
<img src="hinhanh/menu_left_icon.png"/>
<a href="#">Đường link thứ 1</a>
</div>

<div>
<img src="hinhanh/menu_left_icon.png"/>
<a href="#">Đường link thứ 2</a>
</div>

<div>
<img src="hinhanh/menu_left_icon.png"/>
<a href="#">Đường link thứ 3</a>
</div>

<div>
<img src="hinhanh/menu_left_icon.png"/>
<a href="#">Đường link thứ 4</a>
</div>

<div>
<img src="hinhanh/menu_left_icon.png"/>
<a href="#">Đường link thứ 5</a>
</div>

<div>
<img src="hinhanh/menu_left_icon.png"/>
<a href="#">Đường link thứ 6</a>
</div>

<div>
<img src="hinhanh/menu_left_icon.png"/>
<a href="#">Đường link thứ 7</a>
</div>

<div>
<img src="hinhanh/menu_left_icon.png"/>
<a href="#">Đường link thứ 8</a>
</div>

<div>
<img src="hinhanh/menu_left_icon.png"/>
<a href="#">Đường link thứ 9</a>
</div>

</div><!--end ds_left-->
</div><!--end col_left-->
<div class="col_left_2">

<div class="header_col_left">
<img src="hinhanh/category_icon.png"/>
<div class="title_left">Search</div>
</div ><!--end header_col_left-->

<div id="search_box">
<input class="input_search" type="text" />
<div id="search">
<img src="hinhanh/menu_left_icon.png">

<input class = "submit_search" type="submit" name="Search" value="SEARCH"/>
</div>

</div><!--end search_box-->
</div><!--end col_left_2-->
</aside><!--end aside-->
<content>
<div id="header_content">
<img src="hinhanh/content_icon.png"/>
<h3>Mobile Games Awards 2015</h3>
</div><!--end header_content-->

<div id="noidung">

<div class="baiviet">
<img src="hinhanh/item1.png"/>
<h4>Flappy Bird</h4> <p>Đviệc thiết kếất  việc thiết kế nội thất, từ phonội thất, từ phong cách Nhật Bản hay Hàn nội thất, từ phong cách Nhật Bản hay Hàn nội thất, từ phong cách Nhật Bản hay Hàn nội thất, từ phong cách Nhật Bản hay Hàn nội thất, từ phong cách Nhật Bản hay Hàn nội thất, từ phong cách Nhật Bản hay Hàn nội thất, từ phong cách Nhật Bản hay Hàn ng cách Nhật Bản hay Hàn Quốc đến phong cách Mỹ hay Bắc ÂuĐể có được một chung cư cao cấp, có rất nhiều lựa chọn cho khách hàng trong việc thiết kế nội thất, từ phong cách Nhật Bản hay Hàn Quốc đến phong cách Mỹ hay Bắc ÂuĐể có được một chung cư cao cấp, có rất nhiều lựa chọn </p>
</div><!--end baiviet-->


<div class="baiviet">
<img src="hinhanh/item2.png"/>
<h4>Twilight Sparkle</h4> <p>Đviệc thiết kếất  việc thiết kế nội thất, từ phong cách Nhật Bản hay Hàn Quốc đến phong cách Mỹ hay Bắc ÂuĐể có được một chung cư cao cấp, có rất nhiều lựa chọn cho khách hàng trong việc thiết kế nội thất, từ phong cách Nhật Bản hay Hàn Quốc đến phong cách Mỹ hay Bắc ÂuĐnội thất, từ phong cách Nhật Bản hay Hàn nội thất, từ phong cách Nhật Bản hay Hàn vnội thất, từ phong cách Nhật Bản hay Hàn nội thất, từ phong cách Nhật Bản hay Hàn vể có được một chung cư cao cấp, có rất nhiều lựa chọn cho khách hàng trong việc thiết kế nội thất, từ phong cách Nhật Bản hay Hàn Quốc đếng trong việc thiết kế nội thất, </p>
</div><!--end baiviet-->



<div class="baiviet">
<img src="hinhanh/item3.png"/>
<h4>Gumball</h4> <p>Đviệc thiết kếất  việc thiết  Nhật Bản hay Hàn Quốc đến phong cách Mỹ hay Bắc ÂuĐể có được một chung cư cao cấp, có rất nhiều lựa chọn cho khách hàng trong việc thiết kế nội thất, từ phong cách Nhật Bản hay Hàn Quốc đến phong cách Mỹ hay Bắc ÂuĐể có được một chung cư cao cấp, có rất nhiều lựa chọn cho khách hàng trong việc thiết kế nội thất, từ phong cách Nhật Bản hay Hàn Quốc đến phong vvvvnội thất, từ phong cách Nhật Bản hay Hàn nội thất, từ phorất nhiều lựa chọn cho khách hàng trong việc trất nhiều lựa chọn cho khách hàng trong việc tvng cách Nt nhiều lựa chọn cho khách hàng trong việc thiết kế nội thất,</p>
</div><!--end baiviet-->

<div id="trang">
<a href="#">1</a>
<a href="#">2</a>
<a href="#">3</a>
<a href="#">4</a>
<a href="#">5</a>
<a href="#">6</a>
</div><!--end trang-->

</div><!--end noidung-->

</content><!--end content-->
</section<!--end section-->

<footer id ="footer">
<p>Mobile blog Mobile blog Mobile blog Mobile blog </p>
<p>Mobile blog Mobile blog Mobile blog  </p>

</footer><!--end footer-->






</div> <!--end wrapper-->

</body>
</html>

----------------------------------------------------------------------------------------------------------------------------
3- css

*{
padding:0px;
margin:0px;
}

#wrapper{
width:1090px;
background: url(hinhanh/back_header.png) no-repeat left top, url(hinhanh/back2.png) no-repeat top right;
background-color:#1d4401;
min-height:960px;
margin: auto;

}

header{
width: 980px;
background: url(hinhanh/banner.png);
margin-left:110px;
min-height:320px;

}
#logo{
padding-top:50px;
padding-left:58px;


}
header ul li{
list-style:none;
float:left;
background-image: url(hinhanh/menu_icon.png);
background-repeat:no-repeat;
width:95px;
height:95px;
line-height:95px;
text-align:center;
margin-right:8px;
font-size:12px;
text-color:#204004;
}

header ul{
padding-left:20px;
margin-top:70px;
}



aside{
width:245px;
float:left;
margin-right:30px;
margin-top:-73px;
}



.header_col_left{
background: url(hinhanh/col_left_icon.png) no-repeat;
width:245px;
height:47px;
margin-left:110px;


}

.header_col_left img{
margin-left:10px;
margin-top:15px;
float:left;
}

.title_left{
padding-top:15px;
color:#ffea00;
}
#ds_left{
margin-left:110px;
background-color:#7cae1c;
width:214px;
padding:15px;
padding-top:10px;
height:250px;
border-radius: 0px 0px 26px 26px;
}

       a{
text-decoration:none;
color:black;
margin:5px;
padding-bottom:5px;
line-height:20px;
font-size:12px;
}



.col_left_2{
margin-top:20px;
}

#search_box{
margin-left:110px;
background-color:#7cae1c;
width:214px;
padding:15px;
padding-top:10px;
height:90px;
border-radius: 0px 0px 26px 26px;

}

#search{
float:right;
padding:4px;
background-color:#ffea00;
width:70px;
border-radius: 7px;
margin:5px;
margin-top:20px;
}

.input_search{
width:208px;
border-radius:7px;
padding:4px;
}

.submit_search{
font-weight:bold;
font-size:8px;
line-height:20px;
text-align:center;
background-color:#ffea00;
border: 0px solid #ffea00;
}


content{
float:right;
width:610px;
height:495px;
background-color:white;
margin-left:350px;
border: 0px solid white;
border-radius:26px;
margin-right:110px;
padding-top:10px;
margin-top:-500px;
}

#header_content{
width:705px;
margin-left:20px;
float:left;
padding:5px;
}
#header_content img{
float:left;
padding-top:-6px;
padding-right:4px;
}
h3{
font-size:12px;
}


.baiviet img{
float:left;
padding:10px;
}

.baiviet{
text-align:justify;
font-size:11px;
width: 580px;
margin-left:20px;
clear:both;
}

p{
margin-right:20px;
}
#trang{
float: right;
text-decoration:none;
margin-right:20px;
margin-bottom:10px;
}
#trang a:hover{
text-decoration:underline;
}

#footer {
width: 100%
height: 50px;
padding-top:480px;
color:#788a12;
text-align:center;
}


>>Xem bài trước: Bài 11 - html5 css3

No comments:

Post a Comment