Toggle navigation
在线编辑器
在线代码
文本比较
jQuery下载
前端库
在线手册
登录/注册
下载代码
html
css
js
分享到微信朋友圈
X
html
css
#page { align-items: center; background: linear-gradient(to top right, #fc737a 10%, #ff7c9d 65%, #ffc01a 125%); bottom: 0; display: flex; justify-content: center; left: 0; position: absolute; right: 0; top: 0; transition: opacity 1s; } #phrase_box { display: flex; flex-flow: column; height: 150px; overflow: hidden; width: 260px; } #phrases { -webkit-animation: slide-phrases-upward 20s; animation: slide-phrases-upward 20s; } #footer { bottom: 30px; color: white; display: flex; justify-content: center; left: 0; position: fixed; right: 0; } @-webkit-keyframes slide-phrases-upward { 0% { transform: translateY(0px); } 5% { transform: translateY(-50px); } 10% { transform: translateY(-100px); } 15% { transform: translateY(-150px); } 20% { transform: translateY(-200px); } 25% { transform: translateY(-250px); } 30% { transform: translateY(-300px); } 35% { transform: translateY(-350px); } 40% { transform: translateY(-400px); } 45% { transform: translateY(-450px); } 50% { transform: translateY(-500px); } 55% { transform: translateY(-550px); } 60% { transform: translateY(-600px); } 65% { transform: translateY(-650px); } 70% { transform: translateY(-700px); } 75% { transform: translateY(-750px); } 80% { transform: translateY(-800px); } 85% { transform: translateY(-850px); } 90% { transform: translateY(-900px); } 95% { transform: translateY(-950px); } 100% { transform: translateY(-1000px); } } @keyframes slide-phrases-upward { 0% { transform: translateY(0px); } 5% { transform: translateY(-50px); } 10% { transform: translateY(-100px); } 15% { transform: translateY(-150px); } 20% { transform: translateY(-200px); } 25% { transform: translateY(-250px); } 30% { transform: translateY(-300px); } 35% { transform: translateY(-350px); } 40% { transform: translateY(-400px); } 45% { transform: translateY(-450px); } 50% { transform: translateY(-500px); } 55% { transform: translateY(-550px); } 60% { transform: translateY(-600px); } 65% { transform: translateY(-650px); } 70% { transform: translateY(-700px); } 75% { transform: translateY(-750px); } 80% { transform: translateY(-800px); } 85% { transform: translateY(-850px); } 90% { transform: translateY(-900px); } 95% { transform: translateY(-950px); } 100% { transform: translateY(-1000px); } } #loadingCheckCircleSVG-0 { -webkit-animation: fill-to-white 5000ms; animation: fill-to-white 5000ms; -webkit-animation-delay: -1.5s; animation-delay: -1.5s; fill: white; opacity: 0; } #loadingCheckCircleSVG-1 { -webkit-animation: fill-to-white 5000ms; animation: fill-to-white 5000ms; -webkit-animation-delay: -0.5s; animation-delay: -0.5s; fill: white; opacity: 0; } #loadingCheckCircleSVG-2 { -webkit-animation: fill-to-white 5000ms; animation: fill-to-white 5000ms; -webkit-animation-delay: 0.5s; animation-delay: 0.5s; fill: white; opacity: 0; } #loadingCheckCircleSVG-3 { -webkit-animation: fill-to-white 5000ms; animation: fill-to-white 5000ms; -webkit-animation-delay: 1.5s; animation-delay: 1.5s; fill: white; opacity: 0; } #loadingCheckCircleSVG-4 { -webkit-animation: fill-to-white 5000ms; animation: fill-to-white 5000ms; -webkit-animation-delay: 2.5s; animation-delay: 2.5s; fill: white; opacity: 0; } #loadingCheckCircleSVG-5 { -webkit-animation: fill-to-white 5000ms; animation: fill-to-white 5000ms; -webkit-animation-delay: 3.5s; animation-delay: 3.5s; fill: white; opacity: 0; } #loadingCheckCircleSVG-6 { -webkit-animation: fill-to-white 5000ms; animation: fill-to-white 5000ms; -webkit-animation-delay: 4.5s; animation-delay: 4.5s; fill: white; opacity: 0; } #loadingCheckCircleSVG-7 { -webkit-animation: fill-to-white 5000ms; animation: fill-to-white 5000ms; -webkit-animation-delay: 5.5s; animation-delay: 5.5s; fill: white; opacity: 0; } #loadingCheckCircleSVG-8 { -webkit-animation: fill-to-white 5000ms; animation: fill-to-white 5000ms; -webkit-animation-delay: 6.5s; animation-delay: 6.5s; fill: white; opacity: 0; } #loadingCheckCircleSVG-9 { -webkit-animation: fill-to-white 5000ms; animation: fill-to-white 5000ms; -webkit-animation-delay: 7.5s; animation-delay: 7.5s; fill: white; opacity: 0; } #loadingCheckCircleSVG-10 { -webkit-animation: fill-to-white 5000ms; animation: fill-to-white 5000ms; -webkit-animation-delay: 8.5s; animation-delay: 8.5s; fill: white; opacity: 0; } #loadingCheckCircleSVG-11 { -webkit-animation: fill-to-white 5000ms; animation: fill-to-white 5000ms; -webkit-animation-delay: 9.5s; animation-delay: 9.5s; fill: white; opacity: 0; } #loadingCheckCircleSVG-12 { -webkit-animation: fill-to-white 5000ms; animation: fill-to-white 5000ms; -webkit-animation-delay: 10.5s; animation-delay: 10.5s; fill: white; opacity: 0; } #loadingCheckCircleSVG-13 { -webkit-animation: fill-to-white 5000ms; animation: fill-to-white 5000ms; -webkit-animation-delay: 11.5s; animation-delay: 11.5s; fill: white; opacity: 0; } #loadingCheckCircleSVG-14 { -webkit-animation: fill-to-white 5000ms; animation: fill-to-white 5000ms; -webkit-animation-delay: 12.5s; animation-delay: 12.5s; fill: white; opacity: 0; } #loadingCheckCircleSVG-15 { -webkit-animation: fill-to-white 5000ms; animation: fill-to-white 5000ms; -webkit-animation-delay: 13.5s; animation-delay: 13.5s; fill: white; opacity: 0; } #loadingCheckCircleSVG-16 { -webkit-animation: fill-to-white 5000ms; animation: fill-to-white 5000ms; -webkit-animation-delay: 14.5s; animation-delay: 14.5s; fill: white; opacity: 0; } #loadingCheckCircleSVG-17 { -webkit-animation: fill-to-white 5000ms; animation: fill-to-white 5000ms; -webkit-animation-delay: 15.5s; animation-delay: 15.5s; fill: white; opacity: 0; } #loadingCheckCircleSVG-18 { -webkit-animation: fill-to-white 5000ms; animation: fill-to-white 5000ms; -webkit-animation-delay: 16.5s; animation-delay: 16.5s; fill: white; opacity: 0; } #loadingCheckCircleSVG-19 { -webkit-animation: fill-to-white 5000ms; animation: fill-to-white 5000ms; -webkit-animation-delay: 17.5s; animation-delay: 17.5s; fill: white; opacity: 0; } #loadingCheckCircleSVG-20 { -webkit-animation: fill-to-white 5000ms; animation: fill-to-white 5000ms; -webkit-animation-delay: 18.5s; animation-delay: 18.5s; fill: white; opacity: 0; } @-webkit-keyframes fill-to-white { 0% { opacity: 0; } 10% { opacity: 1; } 100% { opacity: 1; } } @keyframes fill-to-white { 0% { opacity: 0; } 10% { opacity: 1; } 100% { opacity: 1; } } #loadingCheckSVG-0 { -webkit-animation: fill-to-coral 5000ms; animation: fill-to-coral 5000ms; -webkit-animation-delay: -1.5s; animation-delay: -1.5s; } #loadingCheckSVG-1 { -webkit-animation: fill-to-coral 5000ms; animation: fill-to-coral 5000ms; -webkit-animation-delay: -0.5s; animation-delay: -0.5s; } #loadingCheckSVG-2 { -webkit-animation: fill-to-coral 5000ms; animation: fill-to-coral 5000ms; -webkit-animation-delay: 0.5s; animation-delay: 0.5s; } #loadingCheckSVG-3 { -webkit-animation: fill-to-coral 5000ms; animation: fill-to-coral 5000ms; -webkit-animation-delay: 1.5s; animation-delay: 1.5s; } #loadingCheckSVG-4 { -webkit-animation: fill-to-coral 5000ms; animation: fill-to-coral 5000ms; -webkit-animation-delay: 2.5s; animation-delay: 2.5s; } #loadingCheckSVG-5 { -webkit-animation: fill-to-coral 5000ms; animation: fill-to-coral 5000ms; -webkit-animation-delay: 3.5s; animation-delay: 3.5s; } #loadingCheckSVG-6 { -webkit-animation: fill-to-coral 5000ms; animation: fill-to-coral 5000ms; -webkit-animation-delay: 4.5s; animation-delay: 4.5s; } #loadingCheckSVG-7 { -webkit-animation: fill-to-coral 5000ms; animation: fill-to-coral 5000ms; -webkit-animation-delay: 5.5s; animation-delay: 5.5s; } #loadingCheckSVG-8 { -webkit-animation: fill-to-coral 5000ms; animation: fill-to-coral 5000ms; -webkit-animation-delay: 6.5s; animation-delay: 6.5s; } #loadingCheckSVG-9 { -webkit-animation: fill-to-coral 5000ms; animation: fill-to-coral 5000ms; -webkit-animation-delay: 7.5s; animation-delay: 7.5s; } #loadingCheckSVG-10 { -webkit-animation: fill-to-coral 5000ms; animation: fill-to-coral 5000ms; -webkit-animation-delay: 8.5s; animation-delay: 8.5s; } #loadingCheckSVG-11 { -webkit-animation: fill-to-coral 5000ms; animation: fill-to-coral 5000ms; -webkit-animation-delay: 9.5s; animation-delay: 9.5s; } #loadingCheckSVG-12 { -webkit-animation: fill-to-coral 5000ms; animation: fill-to-coral 5000ms; -webkit-animation-delay: 10.5s; animation-delay: 10.5s; } #loadingCheckSVG-13 { -webkit-animation: fill-to-coral 5000ms; animation: fill-to-coral 5000ms; -webkit-animation-delay: 11.5s; animation-delay: 11.5s; } #loadingCheckSVG-14 { -webkit-animation: fill-to-coral 5000ms; animation: fill-to-coral 5000ms; -webkit-animation-delay: 12.5s; animation-delay: 12.5s; } #loadingCheckSVG-15 { -webkit-animation: fill-to-coral 5000ms; animation: fill-to-coral 5000ms; -webkit-animation-delay: 13.5s; animation-delay: 13.5s; } #loadingCheckSVG-16 { -webkit-animation: fill-to-coral 5000ms; animation: fill-to-coral 5000ms; -webkit-animation-delay: 14.5s; animation-delay: 14.5s; } #loadingCheckSVG-17 { -webkit-animation: fill-to-coral 5000ms; animation: fill-to-coral 5000ms; -webkit-animation-delay: 15.5s; animation-delay: 15.5s; } #loadingCheckSVG-18 { -webkit-animation: fill-to-coral 5000ms; animation: fill-to-coral 5000ms; -webkit-animation-delay: 16.5s; animation-delay: 16.5s; } #loadingCheckSVG-19 { -webkit-animation: fill-to-coral 5000ms; animation: fill-to-coral 5000ms; -webkit-animation-delay: 17.5s; animation-delay: 17.5s; } #loadingCheckSVG-20 { -webkit-animation: fill-to-coral 5000ms; animation: fill-to-coral 5000ms; -webkit-animation-delay: 18.5s; animation-delay: 18.5s; } @-webkit-keyframes fill-to-coral { 0% { fill: white; } 10% { fill: #FF6D92; } 100% { fill: #FF6D92; } } @keyframes fill-to-coral { 0% { fill: white; } 10% { fill: #FF6D92; } 100% { fill: #FF6D92; } }
JavaScript
var checkmarkIdPrefix = "loadingCheckSVG-"; var checkmarkCircleIdPrefix = "loadingCheckCircleSVG-"; var verticalSpacing = 50; function shuffleArray(array) { for (var i = array.length - 1; i > 0; i--) { var j = Math.floor(Math.random() * (i + 1)); var temp = array[i]; array[i] = array[j]; array[j] = temp; } return array; } function createSVG(tag, properties, opt_children) { var newElement = document.createElementNS("http://www.w3.org/2000/svg", tag); for(prop in properties) { newElement.setAttribute(prop, properties[prop]); } if (opt_children) { opt_children.forEach(function(child) { newElement.appendChild(child); }) } return newElement; } function createPhraseSvg(phrase, yOffset) { var text = createSVG("text", { fill: "white", x: 50, y: yOffset, "font-size": 18, "font-family": "Arial" }); text.appendChild(document.createTextNode(phrase + "...")); return text; } function createCheckSvg(yOffset, index) { var check = createSVG("polygon", { points: "21.661,7.643 13.396,19.328 9.429,15.361 7.075,17.714 13.745,24.384 24.345,9.708 ", fill: "rgba(255,255,255,1)", id: checkmarkIdPrefix + index }); var circle_outline = createSVG("path", { d: "M16,0C7.163,0,0,7.163,0,16s7.163,16,16,16s16-7.163,16-16S24.837,0,16,0z M16,30C8.28,30,2,23.72,2,16C2,8.28,8.28,2,16,2 c7.72,0,14,6.28,14,14C30,23.72,23.72,30,16,30z", fill: "white" }) var circle = createSVG("circle", { id: checkmarkCircleIdPrefix + index, fill: "rgba(255,255,255,0)", cx: 16, cy: 16, r: 15 }) var group = createSVG("g", { transform: "translate(10 " + (yOffset - 20) + ") scale(.9)" }, [circle, check, circle_outline]); return group; } function addPhrasesToDocument(phrases) { phrases.forEach(function(phrase, index) { var yOffset = 30 + verticalSpacing * index; document.getElementById("phrases").appendChild(createPhraseSvg(phrase, yOffset)); document.getElementById("phrases").appendChild(createCheckSvg(yOffset, index)); }); } function easeInOut(t) { var period = 200; return (Math.sin(t / period + 100) + 1) /2; } document.addEventListener("DOMContentLoaded", function(event) { var phrases = shuffleArray(["Feeding unicorns", "Grabbing tasks", "Collating conversations", "Reticulating splines", "Pondering emptiness", "Considering alternatives", "Shuffling bits", "Celebrating moments", "Generating phrases", "Simulating workflow", "Empowering humanity", "Being aspirational", "Doing the hokey pokey", "Bueller", "Cracking jokes", "Slacking off"]); addPhrasesToDocument(phrases); var start_time = new Date().getTime(); var upward_moving_group = document.getElementById("phrases"); upward_moving_group.currentY = 0; var checks = phrases.map(function(_, i) { return {check: document.getElementById(checkmarkIdPrefix + i), circle: document.getElementById(checkmarkCircleIdPrefix + i)}; }); function animateLoading() { var now = new Date().getTime(); upward_moving_group.setAttribute("transform", "translate(0 " + upward_moving_group.currentY + ")"); upward_moving_group.currentY -= 1.35 * easeInOut(now); checks.forEach(function(check, i) { var color_change_boundary = - i * verticalSpacing + verticalSpacing + 15; if (upward_moving_group.currentY < color_change_boundary) { var alpha = Math.max(Math.min(1 - (upward_moving_group.currentY - color_change_boundary + 15)/30, 1), 0); check.circle.setAttribute("fill", "rgba(255, 255, 255, " + alpha + ")"); var check_color = [Math.round(255 * (1-alpha) + 120 * alpha), Math.round(255 * (1-alpha) + 154 * alpha)]; check.check.setAttribute("fill", "rgba(255, " + check_color[0] + "," + check_color[1] + ", 1)"); } }) if (now - start_time < 30000 && upward_moving_group.currentY > -710) { requestAnimationFrame(animateLoading); } } //animateLoading(); });
粒子
时间
文字
hover
canvas
3d
游戏
音乐
火焰
水波
轮播图
鼠标跟随
动画
css
加载动画
导航
菜单
按钮
滑块
tab
弹出层
统计图
svg
×
Close
在线代码下载提示
开通在线代码永久免费下载,需支付20jQ币
开通后,在线代码模块中所有代码可终身免费下!
您已开通在线代码永久免费下载,关闭提示框后,点下载代码可直接下载!
您已经开通过在线代码永久免费下载
对不起,您的jQ币不足!可通过发布资源 或
直接充值获取jQ币
取消
开通下载
<!doctype html> <html> <head> <meta charset="utf-8"> <title>文字滚动效果-jq22.com</title> <script src="https://www.jq22.com/jquery/jquery-1.10.2.js"></script> <style>
</style> </head> <body>
<script>
</script>
</body> </html>
2012-2021 jQuery插件库版权所有
jquery插件
|
jq22工具库
|
网页技术
|
广告合作
|
在线反馈
|
版权声明
沪ICP备13043785号-1
浙公网安备 33041102000314号