Giaoan.link chia sẻ đến các bạn code và cách để bạn “Sử dụng CSS tạo hiệu ứng sóng nước lan truyền – Trang trí đẹp mắt cho web và blog“. Ở project này chúng ta sử dụng trên nền tảng apps script của google. Bạn hoàn toàn có thể deploy thành webapp và embed nó vào website, blog. Bạn cũng có thể viết code trực tiếp trên web wordpress và blogspot.
Các bạn truy cập vào trang tổng hợp project này để tìm thêm nhiều ứng dụng.
Các bài hướng dẫn ngâu nhiên khác:
- Tạo hóa đơn trên Google sheet – Gửi email đính kèm hóa đơn pdf – Quản lý url hóa đơn trên danh sách
- Google sheet Ứng dụng theo dõi đơn hàng – Danh sách sản phẩm mua, trạng thái đơn hàng
- Tip on Ms Word Hướng dẫn tạo ngắt trang, xóa ngắt trang đơn lẽ hoặc toàn bộ ngắt trang trên file doc
- Google sheet | Generate QR Codes – Mã hóa nội dung Cell – Thêm hình ở giữa mã QR code
- Google sheet App Script | Tạo custom menu – Xóa tất cả dòng Rỗng trên vùng dữ liệu Nhanh chống
- Google Script Web | From upload file – Kiểm tra trùng lặp – Ghi đè hoặc Tạo phiên bản mới cho file
- Google Script Web | Trang Tìm kiếm nhiều điều kiên riêng lẽ hoặc hết hợp – Print, Xuất file PDF
- Hướng dẫn kiểm tra Bàn phím, Tháo và thay bàn phím mới cho Dell Inspirion 15 3000 series
- Google sheet webapp | Quản lý bán hàng – Chức nằn trả góp, In thông tin
- Ổ C đầy Di chuyển dữ liệu ZALO sang Ổ D hoặc ổ khác một cách dễ dàng Không lo zalo báo đầy ổ đĩa
Mã trên trang “Code.gs”
function doGet() {
return HtmlService.createTemplateFromFile('index')
.evaluate()
.addMetaTag('viewport', 'width=device-width, initial-scale=1')
.setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL)
}
function include(filename) {
return HtmlService.createHtmlOutputFromFile(filename).getContent();
}
Mã trang “index.html”
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<?!= include('CSS'); ?>
</head>
<body>
<div class="pulse-container">
<div class="pulse1"></div>
<div class="pulse2"></div>
<div class="pulse3"></div>
<img class="round-image" src="https://lh3.googleusercontent.com/d/1VRnMMYhezDoR9NU7fB_op3k5C6Aoo2rZ=w1000?authuser=0" alt="Bird" />
</div>
</body>
</html>
Mã trang “CSS.html”
<style>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
div{
display: grid;
place-items: center;
height: 100vh;
background: #FFFFFF;
}
.round-image {
width: 250px;
height: 250px;
background-color: blue;
border-radius: 50%;
z-index: 1;
position: relative;
}
.pulse-container {
position: relative;
}
.pulse1,
.pulse2,
.pulse3 {
position: absolute;
width: 250px;
height: 250px;
border-radius: 50%;
z-index: 0;
background: red;
animation: pulse 3s infinite;
}
.pulse2 {
animation-delay: 1s;
}
.pulse3 {
animation-delay: 2s;
}
@keyframes pulse {
0% {
transform: scale(1);
opacity: 1;
}
100% {
transform: scale(1.5);
opacity: 0;
}
}
</style>