Professional Documents
Culture Documents
1 LAB Form
Chú ý: Sử dụng các thẻ HTML5 Form để thiết kế. Tự thêm các thuộc tính requried,
placeholder, …
KHOA CNTT – TRƯỜNG ĐH SƯ PHẠM TP. HCM 1
Ver 2022, FIT Thực hành Phát triển ứng dụng Webp
2 CSS3
<style>
p:first-letter {
float: left;
font-size: 45px;
line-height: 1;
font-weight: bold;
margin-right: 9px;
}
</style>
Sửa bài tập 2.1 để tự động chia 3 cột theo chiều rộng trang.
column-count: 3;
column-rule: 1px solid blue;
-webkit-column-count: 3;
-webkit-column-rule: 1px solid blue;
2.3 Transform
Tạo đoạn mã:
<ul>
<li><a href="#">Hover me!</a></li>
<li><a href="#">Hover me!</a></li>
<li><a href="#">Hover me!</a></li>
<li><a href="#">Hover me!</a></li>
</ul>
Bổ sung CSS transform:
li a:hover {
-webkit-transform: rotate(-10deg) scale(2);
transform: rotate(-10deg) scale(2);
}
Chạy thử demo:
{
position:absolute; top:0px; right:0px;
}
.hh-box-name
{
position:absolute;
left:0px; top:-20px; width: inherit;
text-align:center;
}
.hh-box-price
{
position:absolute; left:8px; bottom:8px;
font-weight:bold; color:silver;
}
.hh-box-actions
{
position:absolute; right:8px; bottom:5px; width:25px;
}
.hh-box-actions img
{
cursor:pointer; border:0px;
}
HTML Code:
CSS Code:
h1{
text-align:center;
color:#F00; font-family:Arial;
}
.menu{
width:1200px; height:50px;
margin:auto; background-color:#CCC;
}
.menu ul{
padding:0; margin:0;
list-style:none;
}
.menu ul li{ float:left; }
.menu ul li a{
text-decoration:none;
padding:0 20px;
font-family:Arial;
color:#000;
font-size:14px;
line-height:50px;
display:block;
}
.menu ul li a:hover{
background-color:#333; color:#FFF;
line-height:48px;
border-bottom:2px solid #F00;
}
CSS code:
.menu_ngang{
width:960px; height:50px; background-color:#CCC;
}
.menu_ngang ul{
margin:0; padding:0; list-style:none; float:left;
}
.menu_ngang ul li{
float:left; position:relative;
.menu_ngang ul li a{
text-decoration:none; color:#333; padding:0 20px;
line-height:50px; border-right:1px solid #333;
}
.menu_ngang ul li ul{
position:absolute;
background-color:#ccc;
display:none; width:110%;
}
.menu_ngang ul li ul li a{
border-right:none; border-bottom:1px solid #FFF;
line-height:30px; display:block;
text-align:left; width:100%;
}
HTML code:
Sử dụng hình ảnh trong gói Rubik.rar và áp dụng API Drap & Drop của HTML5 để
hiện thực trang web sau:
Trước khi drap & drop