Apps script Webapp | Sử dụng CSS tạo hiệu ứng sóng nước – Trang trí đẹp mắt cho web và blog.
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:
- VBA Excel Xây dựng hàm chuyển chuỗi có dấu thành không dấu, khoản trắng thành dấu –
- Google sheet Webapp | Lấy dữ liệu trên Sheet hiển thị dạng Bảng có phân trang trùy chọn trên website
- Web App Script | Trang trắc nghiệm online hỗ trợ hình ảnh, lưu file kết quả – Form nhập bộ câu hỏi
- Google sheet Webapp Quản lý Lịch dạy học giáo viên trong trung tâm-Lọc theo Tên-Lớp-Khung giờ -Môn
- Google sheet webapp | CRUD FORM – ĐIỀN THÔNG TIN TỪ FORM VÀO TEMPLATE GOOGLE DOC, KÈM HÌNH ẢNH 1
- Google sheet webapp | Dropdown phụ thuộc – Truy xuất Spreadsheet và các Sheet phụ thuộc từ Folder
- 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
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>