1.实现美元飘落效果

HTML代码如下


<!DOCTYPE html>
<html style="overflow-x:hidden">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Animate.css美元飘落动画特效 - 小小锋叔叔</title>
<meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="css/index.css">
<link rel="stylesheet" href="css/animate.min.css"><script>const NUMBER_OF_LEAVES = 15;const width=window.screen.width;
function init(){var container = document.getElementById('leafContainer');for (var i = 0; i < NUMBER_OF_LEAVES; i++) {container.appendChild(createALeaf());}}
function randomInteger(low, high)
{return low + Math.floor(Math.random() * (high - low));
}
function randomFloat(low, high)
{return low + Math.random() * (high - low);
}
function pixelValue(value)
{return value + 'px';
}function durationValue(value)
{return value + 's';
}
function createALeaf()
{var leafDiv = document.createElement('div');var image = document.createElement('img');image.src = 'images/cash' + randomInteger(3, 7) + '.png';leafDiv.style.top = "-100px";leafDiv.style.left = pixelValue(randomInteger(0, width));var spinAnimationName = (Math.random() < 0.5) ? 'clockwiseSpin' : 'counterclockwiseSpinAndFlip';leafDiv.style.webkitAnimationName = 'fade, drop';image.style.webkitAnimationName = spinAnimationName;var fadeAndDropDuration = durationValue(randomFloat(3, 9));var spinDuration = durationValue(randomFloat(3, 7));leafDiv.style.webkitAnimationDuration = fadeAndDropDuration + ', ' + fadeAndDropDuration;var leafDelay = durationValue(randomFloat(0, 0));leafDiv.style.webkitAnimationDelay = leafDelay + ', ' + leafDelay;image.style.webkitAnimationDuration = spinDuration;leafDiv.appendChild(image);return leafDiv;
}
window.addEventListener('load', init, false);
</script></head><body><div class="moneybox" id="leafContainer"></div></body>
</html>

CSS

*{margin: 0px}
img{vertical-align: middle}body{ margin: 0;width: 100%;font-size: 16px;box-sizing: border-box;cursor: default;cursor: pointer;background: #cf1e38 }.moneybox{width: 100%;height: 100%;}#leafContainer {position: absolute;width: 100%;height: 100%;overflow: hidden;
}#leafContainer > div {position: absolute;width: 200px;height: 150px;-webkit-animation-iteration-count: infinite, infinite;-webkit-animation-direction: normal, normal;-webkit-animation-timing-function: linear, ease-in;
}
#leafContainer > div > img {position: absolute;width: 200px;height: 150px;-webkit-animation-iteration-count: infinite;-webkit-animation-direction: alternate;-webkit-animation-timing-function: ease-in-out;-webkit-transform-origin: 50% -100%;
}
@-webkit-keyframes fade {0% {
opacity: 1;
}95% {
opacity: 1;
}100% {
opacity: 0;
}
}
@-webkit-keyframes drop {0% {
-webkit-transform: translate(0px, -50px);
}100% {
-webkit-transform: translate(0px, 650px);
}
}
@-webkit-keyframes clockwiseSpin {0% {
-webkit-transform: rotate(-50deg);
}100% {
-webkit-transform: rotate(50deg);
}
}
@-webkit-keyframes counterclockwiseSpinAndFlip {0% {
-webkit-transform: scale(-1, 1) rotate(50deg);
}100% {
-webkit-transform: scale(-1, 1) rotate(-50deg);
}
}

需完整源码请留言

2.实现雷达扫描效果

HTML


<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>CSS3雷达扫描动画特效 - 站长素材</title><link rel="stylesheet" href="css/style.css"></head>
<body><div class="radar"></div><div style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';color:#ffffff">
<p>适用浏览器:360、FireFox、Chrome、Opera、傲游、搜狗、世界之窗. 不支持Safari、IE8及以下浏览器。</p>
<p>来源:<a href="http://sc.chinaz.com/" target="_blank">小小锋叔叔</a></p>
</div>
</body>
</html>

CSS

* {box-sizing: border-box;
}html {height: 100%;background-color: #111;font-size: 10px;
}body {background-image: linear-gradient(0deg, transparent 24%, rgba(32, 255, 77, 0.15) 25%, rgba(32, 255, 77, 0.15) 26%, transparent 27%, transparent 74%, rgba(32, 255, 77, 0.15) 75%, rgba(32, 255, 77, 0.15) 76%, transparent 77%, transparent), linear-gradient(90deg, transparent 24%, rgba(32, 255, 77, 0.15) 25%, rgba(32, 255, 77, 0.15) 26%, transparent 27%, transparent 74%, rgba(32, 255, 77, 0.15) 75%, rgba(32, 255, 77, 0.15) 76%, transparent 77%, transparent);background-size: 7rem 7rem;background-position: -5.2rem -5.2rem;width: 100%;height: 100%;position: relative;padding: 0;margin: 0;font-size: 1.6rem;
}.radar {background: -webkit-radial-gradient(center, rgba(32, 255, 77, 0.3) 0%, rgba(32, 255, 77, 0) 75%), -webkit-repeating-radial-gradient(rgba(32, 255, 77, 0) 5.8%, rgba(32, 255, 77, 0) 18%, #20ff4d 18.6%, rgba(32, 255, 77, 0) 18.9%), -webkit-linear-gradient(90deg, rgba(32, 255, 77, 0) 49.5%, #20ff4d 50%, #20ff4d 50%, rgba(32, 255, 77, 0) 50.2%), -webkit-linear-gradient(0deg, rgba(32, 255, 77, 0) 49.5%, #20ff4d 50%, #20ff4d 50%, rgba(32, 255, 77, 0) 50.2%);background: radial-gradient(center, rgba(32, 255, 77, 0.3) 0%, rgba(32, 255, 77, 0) 75%), repeating-radial-gradient(rgba(32, 255, 77, 0) 5.8%, rgba(32, 255, 77, 0) 18%, #20ff4d 18.6%, rgba(32, 255, 77, 0) 18.9%), linear-gradient(90deg, rgba(32, 255, 77, 0) 49.5%, #20ff4d 50%, #20ff4d 50%, rgba(32, 255, 77, 0) 50.2%), linear-gradient(0deg, rgba(32, 255, 77, 0) 49.5%, #20ff4d 50%, #20ff4d 50%, rgba(32, 255, 77, 0) 50.2%);width: 75vw;height: 75vw;max-height: 75vh;max-width: 75vh;position: relative;left: 50%;top: 50%;transform: translate(-50%, -50%);border-radius: 50%;border: 0.2rem solid #20ff4d;overflow: hidden;
}
.radar:before {content: ' ';display: block;position: absolute;width: 100%;height: 100%;border-radius: 50%;animation: blips 5s infinite;animation-timing-function: linear;animation-delay: 1.4s;
}
.radar:after {content: ' ';display: block;background-image: linear-gradient(44deg, rgba(0, 255, 51, 0) 50%, #00ff33 100%);width: 50%;height: 50%;position: absolute;top: 0;left: 0;animation: radar-beam 5s infinite;animation-timing-function: linear;transform-origin: bottom right;border-radius: 100% 0 0 0;
}@keyframes radar-beam {0% {transform: rotate(0deg);}100% {transform: rotate(360deg);}
}
@keyframes blips {14% {background: radial-gradient(2vmin circle at 75% 70%, #ffffff 10%, #20ff4d 30%, rgba(255, 255, 255, 0) 100%);}14.0002% {background: radial-gradient(2vmin circle at 75% 70%, #ffffff 10%, #20ff4d 30%, rgba(255, 255, 255, 0) 100%), radial-gradient(2vmin circle at 63% 72%, #ffffff 10%, #20ff4d 30%, rgba(255, 255, 255, 0) 100%);}25% {background: radial-gradient(2vmin circle at 75% 70%, #ffffff 10%, #20ff4d 30%, rgba(255, 255, 255, 0) 100%), radial-gradient(2vmin circle at 63% 72%, #ffffff 10%, #20ff4d 30%, rgba(255, 255, 255, 0) 100%), radial-gradient(2vmin circle at 56% 86%, #ffffff 10%, #20ff4d 30%, rgba(255, 255, 255, 0) 100%);}26% {background: radial-gradient(2vmin circle at 75% 70%, #ffffff 10%, #20ff4d 30%, rgba(255, 255, 255, 0) 100%), radial-gradient(2vmin circle at 63% 72%, #ffffff 10%, #20ff4d 30%, rgba(255, 255, 255, 0) 100%), radial-gradient(2vmin circle at 56% 86%, #ffffff 10%, #20ff4d 30%, rgba(255, 255, 255, 0) 100%);opacity: 1;}100% {background: radial-gradient(2vmin circle at 75% 70%, #ffffff 10%, #20ff4d 30%, rgba(255, 255, 255, 0) 100%), radial-gradient(2vmin circle at 63% 72%, #ffffff 10%, #20ff4d 30%, rgba(255, 255, 255, 0) 100%), radial-gradient(2vmin circle at 56% 86%, #ffffff 10%, #20ff4d 30%, rgba(255, 255, 255, 0) 100%);opacity: 0;}
}

3.实现手势变化特效

HTML


<!DOCTYPE html>
<html><head><meta charset="UTF-8"><title>CSS3手势变换动画特效 - 小小锋叔叔</title><style>
.hand {position: relative;top: 40%;left: 50%;transform: translate(-50%, -50%);background-color: #f3c5ad;width: 300px;height: 230.76923077px;border-radius: 30px;border: 1px solid #8c3e15;
}
.hand .finger {position: absolute;bottom: 80%;right: 0;width: 75px;height: 75px;border-top-left-radius: 75px;border-top-right-radius: 75px;background-color: #f3c5ad;border-left: 1px solid #b9511b;border-right: 1px solid #b9511b;border-top: 1px solid #b9511b;transition: .3s;
}
.hand .finger:nth-of-type( 5) {right: 299px;
}
.hand .finger:nth-of-type( 4) {right: 224px;
}
.hand .finger:nth-of-type( 3) {right: 149px;
}
.hand .finger:nth-of-type( 2) {right: 74px;
}
.hand .finger:nth-of-type( 1) {right: -1px;
}
.hand .finger.thumb {transform-origin: left bottom;transform: rotate(-45deg);bottom: 10px;right: 217.39130435px;z-index: -1;height: 150px;border-right: 0;border-top: 1px solid #b9511b;
}
.hand .finger.thumb:before {top: 2%;
}
.hand .finger:before,
.hand .finger:after {content: "";position: absolute;top: 5%;left: 7%;width: 85%;height: 60px;border-top-left-radius: 75px;border-top-right-radius: 75px;background: linear-gradient(to bottom, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 100%);transition: .2s;
}
.hand .finger:after {top: 50%;height: 37.5px;background: linear-gradient(to bottom, rgba(185, 81, 27, 0.2) 0%, rgba(185, 81, 27, 0) 100%);display: none;
}
.hand .arm {position: absolute;bottom: -80%;left: 50%;transform: translate(-50%, 0);width: 200px;height: 200px;background-color: #f3c5ad;border-left: 1px solid #b9511b;border-right: 1px solid #b9511b;
}
label {width: 100px;height: 30px;display: inline-block;border-radius: 14px;line-height: 23.07692308px;font-style: normal;color: #fff;text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);font-weight: bold;transition: .5s;cursor: pointer;position: absolute;bottom: 1%;left: 50%;transform: translate(-50%, -50%);z-index: 9;
}
label:after {content: "";position: absolute;bottom: -20%;left: 50%;transform: translateX(-50%);width: 200px;height: 50px;background-color: #b9511b;z-index: -1;
}
label i {position: absolute;top: -4px;right: 60px;width: 36px;height: 36px;display: block;border-radius: 36px;background: white;box-shadow: inset 0 -3px 3px 0 rgba(0, 0, 0, 0.1), inset 0 -1px 1px 0 rgba(255, 255, 255, 0.4), 0 2px 0 0 rgba(0, 0, 0, 0.2);transition: .2s;
}
label i:before {content: "";display: block;position: absolute;top: 50%;left: 50%;width: 18px;height: 18px;margin: -9px 0 0 -9px;border-radius: 18px;background-color: #f3c5ad;box-shadow: inset 0 1px 0 0 rgba(0, 0, 0, 0.2);
}
label:before {content: "metal";margin-left: 50px;text-transform: uppercase;transition: .2s;
}
input[type=checkbox]:checked ~ label:before {content: "punk";text-transform: uppercase;margin-right: 30px;margin-left: 0;
}
input[type=checkbox]:checked ~ label {background: radial-gradient(center, ellipse cover, #8dad33 0%, #92b237 24%, #9dbb40 55%, #a6c24e 100%);
}
input[type=checkbox]:checked ~ label i {right: -6px;
}
input {opacity: 0;
}
input[type=checkbox] ~ .hand .finger {height: 75px;
}
input[type=checkbox] ~ .hand .finger:after {display: none;
}
input[type=checkbox] ~ .hand .finger:before {background: linear-gradient(to bottom, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 100%);
}
input[type=checkbox] ~ .hand .finger:nth-of-type(1),
input[type=checkbox] ~ .hand .finger:nth-of-type(4) {height: 214.28571429px;
}
input[type=checkbox] ~ .hand .finger:nth-of-type(1):before,
input[type=checkbox] ~ .hand .finger:nth-of-type(4):before {top: 2%;background: rgba(255, 255, 255, 0.5);border-bottom-left-radius: 37.5px;border-bottom-right-radius: 37.5px;
}
input[type=checkbox] ~ .hand .finger:nth-of-type(1):after,
input[type=checkbox] ~ .hand .finger:nth-of-type(4):after {display: block;
}
input[type=checkbox] ~ .hand .finger:nth-of-type(1) {height: 187.5px;
}
input[type=checkbox] ~ .hand .finger.thumb {height: 136.36363636px;
}
input[type=checkbox]:checked ~ .hand .finger {height: 75px;
}
input[type=checkbox]:checked ~ .hand .finger:after {display: none;
}
input[type=checkbox]:checked ~ .hand .finger:before {background: linear-gradient(to bottom, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 100%);
}
input[type=checkbox]:checked ~ .hand .finger:nth-of-type(3) {height: 250px;
}
input[type=checkbox]:checked ~ .hand .finger:nth-of-type(3):before {top: 2%;background: rgba(255, 255, 255, 0.5);border-bottom-left-radius: 37.5px;border-bottom-right-radius: 37.5px;
}
input[type=checkbox]:checked ~ .hand .finger:nth-of-type(3):after {display: block;
}
input[type=checkbox]:checked ~ .hand .finger.thumb {height: 136.36363636px;
}
/*}*/
html,
body {height: 100%;overflow: hidden;
}
body {background: radial-gradient(ellipse at top left, #699bc8 0%, #b5c5d8 57%);
}</style><script src="js/prefixfree.min.js"></script></head><body>
<div style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';">
<p>适用浏览器:360、FireFox、Chrome、Safari、Opera、傲游、搜狗、世界之窗. 不支持IE8及以下浏览器。</p>
<p>来源:<a href="http://sc.chinaz.com/" target="_blank">小小锋叔叔</a></p>
</div>
<input type="checkbox" id="switch"/>
<label for="switch"><i></i></label>
<div class="hand"><div class="finger"></div><div class="finger"></div><div class="finger"></div><div class="finger"></div><div class="finger thumb"></div><div class="arm"></div>
</div>
</body>
</html>

css


<!DOCTYPE html>
<html><head><meta charset="UTF-8"><title>CSS3手势变换动画特效 - 小小锋叔叔</title><style>
.hand {position: relative;top: 40%;left: 50%;transform: translate(-50%, -50%);background-color: #f3c5ad;width: 300px;height: 230.76923077px;border-radius: 30px;border: 1px solid #8c3e15;
}
.hand .finger {position: absolute;bottom: 80%;right: 0;width: 75px;height: 75px;border-top-left-radius: 75px;border-top-right-radius: 75px;background-color: #f3c5ad;border-left: 1px solid #b9511b;border-right: 1px solid #b9511b;border-top: 1px solid #b9511b;transition: .3s;
}
.hand .finger:nth-of-type( 5) {right: 299px;
}
.hand .finger:nth-of-type( 4) {right: 224px;
}
.hand .finger:nth-of-type( 3) {right: 149px;
}
.hand .finger:nth-of-type( 2) {right: 74px;
}
.hand .finger:nth-of-type( 1) {right: -1px;
}
.hand .finger.thumb {transform-origin: left bottom;transform: rotate(-45deg);bottom: 10px;right: 217.39130435px;z-index: -1;height: 150px;border-right: 0;border-top: 1px solid #b9511b;
}
.hand .finger.thumb:before {top: 2%;
}
.hand .finger:before,
.hand .finger:after {content: "";position: absolute;top: 5%;left: 7%;width: 85%;height: 60px;border-top-left-radius: 75px;border-top-right-radius: 75px;background: linear-gradient(to bottom, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 100%);transition: .2s;
}
.hand .finger:after {top: 50%;height: 37.5px;background: linear-gradient(to bottom, rgba(185, 81, 27, 0.2) 0%, rgba(185, 81, 27, 0) 100%);display: none;
}
.hand .arm {position: absolute;bottom: -80%;left: 50%;transform: translate(-50%, 0);width: 200px;height: 200px;background-color: #f3c5ad;border-left: 1px solid #b9511b;border-right: 1px solid #b9511b;
}
label {width: 100px;height: 30px;display: inline-block;border-radius: 14px;line-height: 23.07692308px;font-style: normal;color: #fff;text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);font-weight: bold;transition: .5s;cursor: pointer;position: absolute;bottom: 1%;left: 50%;transform: translate(-50%, -50%);z-index: 9;
}
label:after {content: "";position: absolute;bottom: -20%;left: 50%;transform: translateX(-50%);width: 200px;height: 50px;background-color: #b9511b;z-index: -1;
}
label i {position: absolute;top: -4px;right: 60px;width: 36px;height: 36px;display: block;border-radius: 36px;background: white;box-shadow: inset 0 -3px 3px 0 rgba(0, 0, 0, 0.1), inset 0 -1px 1px 0 rgba(255, 255, 255, 0.4), 0 2px 0 0 rgba(0, 0, 0, 0.2);transition: .2s;
}
label i:before {content: "";display: block;position: absolute;top: 50%;left: 50%;width: 18px;height: 18px;margin: -9px 0 0 -9px;border-radius: 18px;background-color: #f3c5ad;box-shadow: inset 0 1px 0 0 rgba(0, 0, 0, 0.2);
}
label:before {content: "metal";margin-left: 50px;text-transform: uppercase;transition: .2s;
}
input[type=checkbox]:checked ~ label:before {content: "punk";text-transform: uppercase;margin-right: 30px;margin-left: 0;
}
input[type=checkbox]:checked ~ label {background: radial-gradient(center, ellipse cover, #8dad33 0%, #92b237 24%, #9dbb40 55%, #a6c24e 100%);
}
input[type=checkbox]:checked ~ label i {right: -6px;
}
input {opacity: 0;
}
input[type=checkbox] ~ .hand .finger {height: 75px;
}
input[type=checkbox] ~ .hand .finger:after {display: none;
}
input[type=checkbox] ~ .hand .finger:before {background: linear-gradient(to bottom, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 100%);
}
input[type=checkbox] ~ .hand .finger:nth-of-type(1),
input[type=checkbox] ~ .hand .finger:nth-of-type(4) {height: 214.28571429px;
}
input[type=checkbox] ~ .hand .finger:nth-of-type(1):before,
input[type=checkbox] ~ .hand .finger:nth-of-type(4):before {top: 2%;background: rgba(255, 255, 255, 0.5);border-bottom-left-radius: 37.5px;border-bottom-right-radius: 37.5px;
}
input[type=checkbox] ~ .hand .finger:nth-of-type(1):after,
input[type=checkbox] ~ .hand .finger:nth-of-type(4):after {display: block;
}
input[type=checkbox] ~ .hand .finger:nth-of-type(1) {height: 187.5px;
}
input[type=checkbox] ~ .hand .finger.thumb {height: 136.36363636px;
}
input[type=checkbox]:checked ~ .hand .finger {height: 75px;
}
input[type=checkbox]:checked ~ .hand .finger:after {display: none;
}
input[type=checkbox]:checked ~ .hand .finger:before {background: linear-gradient(to bottom, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 100%);
}
input[type=checkbox]:checked ~ .hand .finger:nth-of-type(3) {height: 250px;
}
input[type=checkbox]:checked ~ .hand .finger:nth-of-type(3):before {top: 2%;background: rgba(255, 255, 255, 0.5);border-bottom-left-radius: 37.5px;border-bottom-right-radius: 37.5px;
}
input[type=checkbox]:checked ~ .hand .finger:nth-of-type(3):after {display: block;
}
input[type=checkbox]:checked ~ .hand .finger.thumb {height: 136.36363636px;
}
/*}*/
html,
body {height: 100%;overflow: hidden;
}
body {background: radial-gradient(ellipse at top left, #699bc8 0%, #b5c5d8 57%);
}</style><script src="js/prefixfree.min.js"></script></head><body>
<div style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';">
<p>适用浏览器:360、FireFox、Chrome、Safari、Opera、傲游、搜狗、世界之窗. 不支持IE8及以下浏览器。</p>
<p>来源:<a href="http://sc.chinaz.com/" target="_blank">小小锋叔叔</a></p>
</div>
<input type="checkbox" id="switch"/>
<label for="switch"><i></i></label>
<div class="hand"><div class="finger"></div><div class="finger"></div><div class="finger"></div><div class="finger"></div><div class="finger thumb"></div><div class="arm"></div>
</div>
</body>
</html>
html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}

js

/*** StyleFix 1.0.3 & PrefixFree 1.0.7* @author Lea Verou* MIT license*/
(function(){function t(e,t){return[].slice.call((t||document).querySelectorAll(e))}if(!window.addEventListener)return;var e=window.StyleFix={link:function(t){try{if(t.rel!=="stylesheet"||t.hasAttribute("data-noprefix"))return}catch(n){return}var r=t.href||t.getAttribute("data-href"),i=r.replace(/[^\/]+$/,""),s=(/^[a-z]{3,10}:/.exec(i)||[""])[0],o=(/^[a-z]{3,10}:\/\/[^\/]+/.exec(i)||[""])[0],u=/^([^?]*)\??/.exec(r)[1],a=t.parentNode,f=new XMLHttpRequest,l;f.onreadystatechange=function(){f.readyState===4&&l()},l=function(){var n=f.responseText;if(n&&t.parentNode&&(!f.status||f.status<400||f.status>600)){n=e.fix(n,!0,t);if(i){n=n.replace(/url\(\s*?((?:"|')?)(.+?)\1\s*?\)/gi,function(e,t,n){return/^([a-z]{3,10}:|#)/i.test(n)?e:/^\/\//.test(n)?'url("'+s+n+'")':/^\//.test(n)?'url("'+o+n+'")':/^\?/.test(n)?'url("'+u+n+'")':'url("'+i+n+'")'});var r=i.replace(/([\\\^\$*+[\]?{}.=!:(|)])/g,"\\$1");n=n.replace(RegExp("\\b(behavior:\\s*?url\\('?\"?)"+r,"gi"),"$1")}var l=document.createElement("style");l.textContent=n,l.media=t.media,l.disabled=t.disabled,l.setAttribute("data-href",t.getAttribute("href")),a.insertBefore(l,t),a.removeChild(t),l.media=t.media}};try{f.open("GET",r),f.send(null)}catch(n){typeof XDomainRequest!="undefined"&&(f=new XDomainRequest,f.onerror=f.onprogress=function(){},f.onload=l,f.open("GET",r),f.send(null))}t.setAttribute("data-inprogress","")},styleElement:function(t){if(t.hasAttribute("data-noprefix"))return;var n=t.disabled;t.textContent=e.fix(t.textContent,!0,t),t.disabled=n},styleAttribute:function(t){var n=t.getAttribute("style");n=e.fix(n,!1,t),t.setAttribute("style",n)},process:function(){t("style").forEach(StyleFix.styleElement),t("[style]").forEach(StyleFix.styleAttribute)},register:function(t,n){(e.fixers=e.fixers||[]).splice(n===undefined?e.fixers.length:n,0,t)},fix:function(t,n,r){for(var i=0;i<e.fixers.length;i++)t=e.fixers[i](t,n,r)||t;return t},camelCase:function(e){return e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()}).replace("-","")},deCamelCase:function(e){return e.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()})}};(function(){setTimeout(function(){},10),document.addEventListener("DOMContentLoaded",StyleFix.process,!1)})()})(),function(e){function t(e,t,r,i,s){e=n[e];if(e.length){var o=RegExp(t+"("+e.join("|")+")"+r,"gi");s=s.replace(o,i)}return s}if(!window.StyleFix||!window.getComputedStyle)return;var n=window.PrefixFree={prefixCSS:function(e,r,i){var s=n.prefix;n.functions.indexOf("linear-gradient")>-1&&(e=e.replace(/(\s|:|,)(repeating-)?linear-gradient\(\s*(-?\d*\.?\d*)deg/ig,function(e,t,n,r){return t+(n||"")+"linear-gradient("+(90-r)+"deg"})),e=t("functions","(\\s|:|,)","\\s*\\(","$1"+s+"$2(",e),e=t("keywords","(\\s|:)","(\\s|;|\\}|$)","$1"+s+"$2$3",e),e=t("properties","(^|\\{|\\s|;)","\\s*:","$1"+s+"$2:",e);if(n.properties.length){var o=RegExp("\\b("+n.properties.join("|")+")(?!:)","gi");e=t("valueProperties","\\b",":(.+?);",function(e){return e.replace(o,s+"$1")},e)}return r&&(e=t("selectors","","\\b",n.prefixSelector,e),e=t("atrules","@","\\b","@"+s+"$1",e)),e=e.replace(RegExp("-"+s,"g"),"-"),e=e.replace(/-\*-(?=[a-z]+)/gi,n.prefix),e},property:function(e){return(n.properties.indexOf(e)?n.prefix:"")+e},value:function(e,r){return e=t("functions","(^|\\s|,)","\\s*\\(","$1"+n.prefix+"$2(",e),e=t("keywords","(^|\\s)","(\\s|$)","$1"+n.prefix+"$2$3",e),e},prefixSelector:function(e){return e.replace(/^:{1,2}/,function(e){return e+n.prefix})},prefixProperty:function(e,t){var r=n.prefix+e;return t?StyleFix.camelCase(r):r}};(function(){var e={},t=[],r={},i=getComputedStyle(document.documentElement,null),s=document.createElement("div").style,o=function(n){if(n.charAt(0)==="-"){t.push(n);var r=n.split("-"),i=r[1];e[i]=++e[i]||1;while(r.length>3){r.pop();var s=r.join("-");u(s)&&t.indexOf(s)===-1&&t.push(s)}}},u=function(e){return StyleFix.camelCase(e)in s};if(i.length>0)for(var a=0;a<i.length;a++)o(i[a]);else for(var f in i)o(StyleFix.deCamelCase(f));var l={uses:0};for(var c in e){var h=e[c];l.uses<h&&(l={prefix:c,uses:h})}n.prefix="-"+l.prefix+"-",n.Prefix=StyleFix.camelCase(n.prefix),n.properties=[];for(var a=0;a<t.length;a++){var f=t[a];if(f.indexOf(n.prefix)===0){var p=f.slice(n.prefix.length);u(p)||n.properties.push(p)}}n.Prefix=="Ms"&&!("transform"in s)&&!("MsTransform"in s)&&"msTransform"in s&&n.properties.push("transform","transform-origin"),n.properties.sort()})(),function(){function i(e,t){return r[t]="",r[t]=e,!!r[t]}var e={"linear-gradient":{property:"backgroundImage",params:"red, teal"},calc:{property:"width",params:"1px + 5%"},element:{property:"backgroundImage",params:"#foo"},"cross-fade":{property:"backgroundImage",params:"url(a.png), url(b.png), 50%"}};e["repeating-linear-gradient"]=e["repeating-radial-gradient"]=e["radial-gradient"]=e["linear-gradient"];var t={initial:"color","zoom-in":"cursor","zoom-out":"cursor",box:"display",flexbox:"display","inline-flexbox":"display",flex:"display","inline-flex":"display",grid:"display","inline-grid":"display","min-content":"width"};n.functions=[],n.keywords=[];var r=document.createElement("div").style;for(var s in e){var o=e[s],u=o.property,a=s+"("+o.params+")";!i(a,u)&&i(n.prefix+a,u)&&n.functions.push(s)}for(var f in t){var u=t[f];!i(f,u)&&i(n.prefix+f,u)&&n.keywords.push(f)}}(),function(){function s(e){return i.textContent=e+"{}",!!i.sheet.cssRules.length}var t={":read-only":null,":read-write":null,":any-link":null,"::selection":null},r={keyframes:"name",viewport:null,document:'regexp(".")'};n.selectors=[],n.atrules=[];var i=e.appendChild(document.createElement("style"));for(var o in t){var u=o+(t[o]?"("+t[o]+")":"");!s(u)&&s(n.prefixSelector(u))&&n.selectors.push(o)}for(var a in r){var u=a+" "+(r[a]||"");!s("@"+u)&&s("@"+n.prefix+u)&&n.atrules.push(a)}e.removeChild(i)}(),n.valueProperties=["transition","transition-property"],e.className+=" "+n.prefix,StyleFix.register(n.prefixCSS)}(document.documentElement);

HTML+CSS+JS 实现炫酷效果,你知道几种呢?相关推荐

  1. HTML+CSS+JS制作炫酷【烟花特效】

    文章目录 制作炫酷烟花特效 一.普通烟花(分散形) HTML代码 CSS代码 JS代码 二.圆形烟花 HTML代码 CSS代码 JS代码 三.爱心形烟花 HTML代码 CSS代码 JS代码 四.源码获 ...

  2. css+js 实现炫酷的魔方旋转

    魔方的简单旋转 (后续会有进阶版) 先附上效果图(图片大小限制,效果图不是很明显) 图片可以在img文件夹中自己添加(注意命名格式) 关于魔方图片代码位置如下图显示(在script部分) 这是命名格式 ...

  3. 用css写出炫酷效果 !!

    https://juejin.cn/post/7002829486806794276

  4. [译] CSS 变量实现炫酷鼠标悬浮效果

    原文: Stunning hover effects with CSS variables 我的博客:[译] CSS 变量实现炫酷鼠标悬浮效果 我最近从Grover网站上的有趣的悬停动画中获得灵感.将 ...

  5. html中flash的简单动画效果,css实现快速炫酷抖动动画效果

    1.Animate.css简介 Animate.css是一个可在您的Web项目中使用的即用型跨浏览器动画库.非常适合强调,首页,滑块和引导注意的提示.它是一个来自国外的 CSS3 动画库,它预设了抖动 ...

  6. html+css+javaScript实现炫酷烟花表白(云雾状粒子文字3D开场)七夕情人节表白/520表白源码HTML...

    ❉ html+css+javaScript实现炫酷烟花表白❤ (云雾状粒子文字3D动画自动切换,支持自定义文字动画切换特效)/ 程序员表白必备 ​​一年一度的/520情人节/七夕情人节/生日礼物/告白 ...

  7. html border阴影效果_一篇文章教会你使用html+css3制作炫酷效果

    [一.项目背景] 在浏览一些网站的时候,经常会看到很多的炫酷的效果去装饰页面,使它看起来更高端大气一些.比如,艺龙就采用了图片上加载文字,点击图片使把对应的图片放大,使用户清晰,直观的看到内容.这种效 ...

  8. Mapbox GL JS实现炫酷的地图背景

    经常看到网上的各种地图,有着炫酷的地图背景,用户体验非常不错.在Mapbox GL JS这块,其实关于地图的背景没有太多的设置.但当我们想基于Mapbox GL JS实现炫酷的地图背景改怎么办呢?这里 ...

  9. 黑客帝国中代码雨如何实现?用 canvas 轻松实现代码雨炫酷效果!

    目录 1 效果 2 用到的知识点 2.1  什么是 canvas标签? 2.1.1 创建一个画布(Canvas) 2.1.2 使用 JavaScript 来绘制图像 2.1.3 Canvas 坐标 2 ...

最新文章

  1. SAP WM 共用同一个仓库号的2个存储地点之间转库
  2. Lesson 13.3 梯度不平稳性与Glorot条件
  3. c语言程序设计第二版李学刚,C语言程序设计(第2版)李学刚教学资源教学课件2-7 动态变量.pptx...
  4. centos6实现kvm嵌套虚拟化
  5. 构造函数与toString
  6. 二叉树的常用操作(节点的后继节点)
  7. android 嵌套分组拖动_Android NestedScrolling嵌套滑动机制
  8. Linux 增加交换分区
  9. python异常捕获try except
  10. java 权重 分配_一种按权重分配的Java算法
  11. PayPal 支付接口詳解
  12. ST7200.11固件门DIY全程记录[2009-05-03修复成功!]
  13. C/C++KTV点歌系统
  14. 最新2021计算机排名中国大学排名,2020-2021年计算机类专业排名_中国大学本科教育按专业类排行榜_中国科教评价网...
  15. 笔记本重置找不到恢复环境_Win10重置找不到恢复环境需要安装介质的修复图文教程...
  16. 开源项目——小Q聊天机器人V1.4
  17. Python wxpy 操作微信 大全集
  18. php计算问卷分数,php 问卷调查结果统计
  19. java编写超市收银系统_java编写的超市收银系统
  20. 关于鸿蒙系统传统文化的作文,【热门】传统文化作文汇编6篇

热门文章

  1. java吸血鬼数字_吸血鬼数字(java)
  2. ArcGIS10试用体验之安装篇
  3. vue下拉el-select二级联动
  4. 互联网电影院5G让3D体验更流畅
  5. Java集合框架——List接口
  6. Windows10_如何修改用户文件夹下的中文用户文件夹名
  7. [附源码]java毕业设计流浪宠物免费领养系统
  8. Spring MVC 地址请求映射
  9. #自动化测试框架的4种有效分类与使用选择
  10. iphone 存图片和视频到iPhone相册