1. 程式人生 > 其它 >短視訊帶貨系統,HTML+CSS+JS實現宇宙星球旋轉動畫特效

短視訊帶貨系統,HTML+CSS+JS實現宇宙星球旋轉動畫特效

短視訊帶貨系統,HTML+CSS+JS實現宇宙星球旋轉動畫特效
主要程式碼實現:
css樣式:

/**
* @date 2021/1/20 16:10
*/

/* 取消預設間距 */

* {
margin: 0;
padding: 0;
}

a {
text-decoration: none;
color: #fff;
outline: none
}

.container {
width: 100%;
height: 100%;
background: url('../img/allStart.jpg')no-repeat center center;
background-size: 100% 100%;
position: absolute;
overflow: hidden;
}

html :

<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>旋轉星球</title>
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/totate.css
"> </head> <body> <div class="container"> <div id="content"> <div class="section3"> <div class="ui_base u_p3d"> <!-- 中間圓球 --> <div class="ball_c"></div> <!-- 外側軌道線 1 --> <div class="base u_p3d"> <!-- 軌道線 2 --> <div class="line1
"></div> <!-- 軌道線 3 --> <div class="line2"></div> <div class="ball_base u_p3d ball_1"> <div class="ball"></div> </div> <div class="ball_base u_p3d ball_2"> <div class="ball"></div> </div> <div class="ball_base u_p3d ball_3"> <div class="ball"></div> </div> <div class="ball_base u_p3d ball_4"> <div class="ball"></div> </div> <div class="ball_base u_p3d ball_5"> <div class="ball"></div> </div> </div> </div> </div> </div> <img src="img/bgbg.png" alt="" style="position:absolute;z-index: 2; width: 200%;height: 100%;opacity: .75;top: 0;left: -50%"> </div> </body> </html>
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>旋轉星球</title>
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/totate.css">
</head>

<body>
<div class="container">
<div id="content">
<div class="section3">
<div class="ui_base u_p3d">
<!-- 中間圓球 -->
<div class="ball_c"></div>
<!-- 外側軌道線 1 -->
<div class="base u_p3d">
<!-- 軌道線 2 -->
<div class="line1"></div>
<!-- 軌道線 3 -->
<div class="line2"></div>
<div class="ball_base u_p3d ball_1">
<div class="ball"></div>
</div>
<div class="ball_base u_p3d ball_2">
<div class="ball"></div>
</div>
<div class="ball_base u_p3d ball_3">
<div class="ball"></div>
</div>
<div class="ball_base u_p3d ball_4">
<div class="ball"></div>
</div>
<div class="ball_base u_p3d ball_5">
<div class="ball"></div>
</div>
</div>
</div>
</div>
</div>
<img src="img/bgbg.png" alt="" style="position:absolute;z-index: 2; width: 200%;height: 100%;opacity: .75;top: 0;left: -50%">
</div>

</body>

</html>

以上就是短視訊帶貨系統,HTML+CSS+JS實現宇宙星球旋轉動畫特效的相關程式碼, 更多內容歡迎關注之後的文章