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:
- Googlesheet appscript – Hệ Thống Đăng Ký Hồ Sơ Trực Tuyến (Online Registration Portal)
- [Share Code] Biến Google Sheet thành Web App Tra Cứu Dự Án & Tài Liệu (Miễn Phí Hosting)
- Hệ Thống Quản Lý Phòng Game “Cloud-Native” với Google Apps Script
- Hệ Thống Điều Phối & Quản Lý Đội Xe Thông Minh (Web App)
- Biến Google Sheets thành Dashboard “Viễn Tưởng” phong cách Cyberpunk
- Google appscript | Hệ thống tìm thông tin và nhập liệu 2 Form-Tự động truy vấn và upload nhiều files
- Google sheet Webapp|Giáo viên chủ nhiệm quản lý điểm, thống kê xếp hạng chia sẻ cho phụ huynh
- Google sheet Webapp | Bản nâng cấp Tìm và Load Thông tin sinh viên có Hình ảnh và Bảng kết quả thi
- Google webapp | Form tìm, hiển thị kết quả học tập nhiều môn và in phiếu kết quả
- Danh mục các Bài học Google sheet Apps script Cơ bản
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>
