- 二、📚網站介紹
- 三、🔗網站效果
- ▶️1.視訊示範
- 🧩 2.圖檔示範
- 四、💒 網站代碼
- 🧱HTML結構代碼
- 🏠CSS樣式代碼
- 五、🎁更多源碼
二、📚網站介紹
📒網站檔案方面:html網頁結構檔案、css網頁樣式檔案、js網頁特效檔案、images網頁圖檔檔案;
📙網頁編輯方面:可使用任意HTML編輯軟體(如:
Dreamweaver、HBuilder、Vscode 、Sublime 、Webstorm、Text 、Notepad++
等任意html編輯軟體進行運作及修改編輯等操作)。
其中:
(1)📜html檔案包含:其中index.html是首頁、其他html為二級頁面;
(2)📑 css檔案包含:css全部頁面樣式,3D動态效果,雪花飄落等等
(3)📄 js檔案包含:頁面炫酷效果實作
三、🔗網站效果
▶️1.視訊示範
18-js+css3愛心表白背景特效
🧩 2.圖檔示範
四、💒 網站代碼
🧱HTML結構代碼
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>❤</title>
<link rel="stylesheet" href="css/index.css">
</head>
<body>
<div class="textCon">
<div class="words">我的小花花,今天是認識你的第</div>
<div class="days">
<span class="days-number">1921</span>
<span class="days-label">天</span>
</div>
<div class="seconds">15 hours 24 minutes 30 seconds</div>
</div>
<div class="heart"></div>
<script src="js/index.js"></script>
<script src="js/love.js"></script>
</body>
</html>
🏠CSS樣式代碼
*{
margin: 0;
padding:0;
}
.heart::after{
position: absolute;
top:0;
left:0;
transform: translateY(-50%);
}
@keyframes{
0%{
transform: scale(0.8) rotate(45deg);
opacity: 0.8;
}
50%{
transform: scale(1) rotate(45deg);
opacity: 1;
}
100%{
transform: scale(0.8) rotate(45deg);
opacity: 0.8;
}
}
.textCon .item{
position: absolute;
opacity: 0;
background-color:#cc2a5d;
transform: rotate(45deg);
animation: hearts 3s ease-in infinite;
}
.textCon .item::before,
.textCon .item::after{
content:'';
width:100%;
height:100%;
background-color:#cc2a5d;
position: absolute;
top:0;
left:0;
border-radius: 50%;
}
.textCon .item::before{
transform: translateX(-50%);
}
.textCon .item::after{
transform: translateY(-50%);
}
@keyframes{
0%{
opacity: 0;
transform: translateY(0%) rotate(45deg);
}
20%{
opacity: 0.8;
transform: translateY(-20%) rotate(45deg);
}
100%{
opacity: 0;
transform: translateY(-1000%) rotate(45deg);
}
}
.days-label {
font-size: 30px;
}
.seconds {
margin-top: 10px;
font-size: 32px;
font-family: "Monda_bo", Georgia, sans-serif;
width: auto;
text-align: center;
}
.seconds-label {
margin-top: 32px;
font-size: 32px;
font-family: "Monda_no", Georgia, sans-serif;
width: auto;
text-align: center;
}
.container {
position: absolute;
}
.days {
font-size: 40px;
width: auto;
text-align: center;
}
.words {
font-size: 50px;
font-family: 'Regular', cursive;
width: auto;
text-align: center;
}
五、🎁更多源碼
1.如果我的部落格對你有幫助
請 “👍點贊” “✍️評論” “💙收藏”
一鍵三連哦!