Danh ngôn cuộc sống:
| • Bài viết được đăng bởi: Mr. Phan Nhan• Ngày cập nhật bài viết: 13/05/2016• Tổng lược xem trang: 345 / 1 khách• Đánh giá bởi người dùng: |
Định nghĩa và sử dụng. Trong CSS3 chúng ta có thể tạo màu sắc cho background theo biên độ giảm dần. Cấu trúc:
vị-trí: được được hiển thị theo các cặp thẻ, kích-thước: được xác định theo giá trị, mã-màu: giá trị màu, n: độ tràn màu (hay độ trộn lẫn), giá trị tính theo %.
HTML viết:
div {
background: -moz-radial-gradient(vị-trí, ellipse kích-thước, mã-màu-1 n1%, mã-màu-2 n2%);
background: -o-radial-gradient(vị-trí, ellipse kích-thước, mã-màu-1 n1%, mã-màu-2 n2%);
background: -ms-radial-gradient(vị-trí, ellipse kích-thước, mã-màu-1 n1%, mã-màu-2 n2%);
background: -webkit-gradient(vị-trí, ellipse kích-thước, mã-màu-1 n1%, mã-màu-2 n2%);
}
Trong đó:background: -moz-radial-gradient(vị-trí, ellipse kích-thước, mã-màu-1 n1%, mã-màu-2 n2%);
background: -o-radial-gradient(vị-trí, ellipse kích-thước, mã-màu-1 n1%, mã-màu-2 n2%);
background: -ms-radial-gradient(vị-trí, ellipse kích-thước, mã-màu-1 n1%, mã-màu-2 n2%);
background: -webkit-gradient(vị-trí, ellipse kích-thước, mã-màu-1 n1%, mã-màu-2 n2%);
}
vị-trí: được được hiển thị theo các cặp thẻ, kích-thước: được xác định theo giá trị, mã-màu: giá trị màu, n: độ tràn màu (hay độ trộn lẫn), giá trị tính theo %.
HTML viết:
<html>
<head></head>
<body>
<div>bạn hãy nhập nội dung cần hiển thị vào đây.</div>
</body>
</html>
Vị trí: top left - kích thước: farthest-side, CSS viết:<head></head>
<body>
<div>bạn hãy nhập nội dung cần hiển thị vào đây.</div>
</body>
</html>
div {
background: -moz-radial-gradient(top left, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(top left, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(top left, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(top left, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
height: 200px;
}
Vị trí: top left - kích thước: farthest-corner, CSS viết:background: -moz-radial-gradient(top left, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(top left, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(top left, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(top left, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
height: 200px;
}
div {
background: -moz-radial-gradient(top left, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(top left, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(top left, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(top left, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
height: 200px;
}
Vị trí: top center - kích thước: closest-side, CSS viết:background: -moz-radial-gradient(top left, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(top left, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(top left, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(top left, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
height: 200px;
}
div {
background: -moz-radial-gradient(top center, ellipse closest-side, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(top center, ellipse closest-side, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(top center, ellipse closest-side, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(top center, ellipse closest-side, #ffffff 0%, #cc0000 100%);
height: 200px;
}
Vị trí: top center - kích thước: farthest-side, CSS viết:background: -moz-radial-gradient(top center, ellipse closest-side, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(top center, ellipse closest-side, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(top center, ellipse closest-side, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(top center, ellipse closest-side, #ffffff 0%, #cc0000 100%);
height: 200px;
}
div {
background: -moz-radial-gradient(top center, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(top center, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(top center, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(top center, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
height: 200px;
}
Vị trí: top center - kích thước: farthest-corner, CSS viết:background: -moz-radial-gradient(top center, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(top center, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(top center, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(top center, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
height: 200px;
}
div {
background: -moz-radial-gradient(top center, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(top center, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(top center, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(top center, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
height: 200px;
}
Vị trí: top right - kích thước: farthest-side, CSS viết:background: -moz-radial-gradient(top center, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(top center, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(top center, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(top center, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
height: 200px;
}
div {
background: -moz-radial-gradient(top right, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(top right, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(top right, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(top right, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
height: 200px;
}
Vị trí: top right - kích thước: farthest-corner, CSS viết:background: -moz-radial-gradient(top right, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(top right, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(top right, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(top right, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
height: 200px;
}
div {
background: -moz-radial-gradient(top right, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(top right, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(top right, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(top right, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
height: 200px;
}
Vị trí: center left - kích thước: farthest-side, CSS viết:background: -moz-radial-gradient(top right, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(top right, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(top right, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(top right, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
height: 200px;
}
div {
background: -moz-radial-gradient(center left, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(center left, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(center left, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(center left, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
height: 200px;
}
Vị trí: center left - kích thước: farthest-corner, CSS viết:background: -moz-radial-gradient(center left, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(center left, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(center left, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(center left, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
height: 200px;
}
div {
background: -moz-radial-gradient(center left, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(center left, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(center left, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(center left, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
height: 200px;
}
Vị trí: center center - kích thước: closest-side, CSS viết:background: -moz-radial-gradient(center left, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(center left, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(center left, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(center left, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
height: 200px;
}
div {
background: -moz-radial-gradient(center center, ellipse closest-side, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(center center, ellipse closest-side, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(center center, ellipse closest-side, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(center center, ellipse closest-side, #ffffff 0%, #cc0000 100%);
height: 200px;
}
Vị trí: center center - kích thước: closest-corner, CSS viết:background: -moz-radial-gradient(center center, ellipse closest-side, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(center center, ellipse closest-side, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(center center, ellipse closest-side, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(center center, ellipse closest-side, #ffffff 0%, #cc0000 100%);
height: 200px;
}
div {
background: -moz-radial-gradient(center center, ellipse closest-corner, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(center center, ellipse closest-corner, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(center center, ellipse closest-corner, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(center center, ellipse closest-corner, #ffffff 0%, #cc0000 100%);
height: 200px;
}
Vị trí: center center - kích thước: farthest-side, CSS viết:background: -moz-radial-gradient(center center, ellipse closest-corner, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(center center, ellipse closest-corner, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(center center, ellipse closest-corner, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(center center, ellipse closest-corner, #ffffff 0%, #cc0000 100%);
height: 200px;
}
div {
background: -moz-radial-gradient(center center, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(center center, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(center center, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(center center, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
height: 200px;
}
Vị trí: center center - kích thước: farthest-corner, CSS viết:background: -moz-radial-gradient(center center, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(center center, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(center center, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(center center, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
height: 200px;
}
div {
background: -moz-radial-gradient(center center, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(center center, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(center center, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(center center, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
height: 200px;
}
Vị trí: center right - kích thước: farthest-side, CSS viết:background: -moz-radial-gradient(center center, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(center center, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(center center, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(center center, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
height: 200px;
}
div {
background: -moz-radial-gradient(center right, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(center right, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(center right, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(center right, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
height: 200px;
}
Vị trí: center right - kích thước: farthest-corner, CSS viết:background: -moz-radial-gradient(center right, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(center right, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(center right, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(center right, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
height: 200px;
}
div {
background: -moz-radial-gradient(center right, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(center right, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(center right, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(center right, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
height: 200px;
}
Vị trí: bottom left - kích thước: farthest-side, CSS viết:background: -moz-radial-gradient(center right, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(center right, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(center right, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(center right, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
height: 200px;
}
div {
background: -moz-radial-gradient(bottom left, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(bottom left, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(bottom left, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(bottom left, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
height: 200px;
}
Vị trí: bottom left - kích thước: farthest-corner, CSS viết:background: -moz-radial-gradient(bottom left, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(bottom left, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(bottom left, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(bottom left, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
height: 200px;
}
div {
background: -moz-radial-gradient(bottom left, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(bottom left, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(bottom left, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(bottom left, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
height: 200px;
}
Vị trí: bottom center - kích thước: farthest-side, CSS viết:background: -moz-radial-gradient(bottom left, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(bottom left, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(bottom left, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(bottom left, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
height: 200px;
}
div {
background: -moz-radial-gradient(bottom center, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(bottom center, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(bottom center, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(bottom center, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
height: 200px;
}
Vị trí: bottom center - kích thước: farthest-corner, CSS viết:background: -moz-radial-gradient(bottom center, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(bottom center, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(bottom center, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(bottom center, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
height: 200px;
}
div {
background: -moz-radial-gradient(bottom center, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(bottom center, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(bottom center, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(bottom center, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
height: 200px;
}
Vị trí: bottom right - kích thước: farthest-side, CSS viết:background: -moz-radial-gradient(bottom center, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(bottom center, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(bottom center, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(bottom center, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
height: 200px;
}
div {
background: -moz-radial-gradient(bottom right, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(bottom right, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(bottom right, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(bottom right, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
height: 200px;
}
Vị trí: bottom right - kích thước: farthest-corner, CSS viết:background: -moz-radial-gradient(bottom right, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(bottom right, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(bottom right, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(bottom right, ellipse farthest-side, #ffffff 0%, #cc0000 100%);
height: 200px;
}
div {
background: -moz-radial-gradient(bottom right, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(bottom right, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(bottom right, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(bottom right, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
height: 200px;
}
background: -moz-radial-gradient(bottom right, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -o-radial-gradient(bottom right, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -ms-radial-gradient(bottom right, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
background: -webkit-radial-gradient(bottom right, ellipse farthest-corner, #ffffff 0%, #cc0000 100%);
height: 200px;
}
Những bài viết được đăng mới nhất. 





Toàn bộ nội dung trên wap là do admin sưu tầm, chỉnh sửa và đã được test thử. Các bạn có thể xem và download về hoàn toàn miễn phí (trừ phí phát sinh từ internet của bạn sử dụng. Chúng tôi khuyến khích bạn nên dùng Wifi để tải dữ liệu). Hiện nay có một số trang web gắn mã kích hoạt vào ứng dụng và game. Các bạn chú ý nên tải game hoặc ứng dụng thì nên vào những trang wepsite uy tín nha. Nếu các bạn không biết kiểm tra file có chứa mã độc hay không, thì có thể tải theo hệ điều hành của mình để khỏi phải mất tiền một cách vô lý nha.