Html
    Css
    Js

    
                        
* {
	box-sizing:border-box;
	padding:0;
	margin:0;
}
body {
	background:#22313f;
}
#starsBox {
	position:fixed;
	top:0;
	left:0;
	right:0;
	bottom:0;
	background:rgba(0,0,0,0.75);
	opacity:.5;
}
#starsBox span {
	display:inline-block;
	width:auto;
	position:absolute;
	border-radius:100%;
	transition:100s linear;
}
p {
	position:fixed;
	top:50%;
	left:0;
	right:0;
	text-align:center;
	transform:translateY(-50%);
	font-size:40px;
	font-weight:900;
	color:white;
	text-shadow:0 0 50px black;
	text-transform:uppercase;
	font-family:'Roboto','Helvetica','Arial',sans-serif;
	letter-spacing:5px;
}
p > span {
	display:block;
	font-size:12px;
	color:#bdc3c7;
	margin-top:30px;
	font-weight:100;
	text-shadow:0 0 50px black;
	letter-spacing:3px;
}
p > span > a {
	font-weight:700;
	text-decoration:none;
	color:#d64541;
	padding-bottom:2px;
	border-bottom:0px solid #d64541;
	transition:0.5s;
}
p > span > a:hover {
	padding-bottom:5px;
	border-bottom:2px solid #d64541;
}

                        
↑上面代码改变,会自动显示代码结果 jQuery调用版本:1.11.3
 立即下载

jQuery和CSS3实现的超简单闪烁星空动画背景

更新时间:2023-04-25 09:22:40

0