html5+css3+svg+jq音量调节ui按钮特效
发表日期: 2020-07-21 09:05:50 浏览次数:127
迪庆网站推广【迪庆官网推广哪个效果好】迪庆百度竞价推广托管、迪庆百度优化推广外包、迪庆全网霸屏推广多少钱、迪庆网络推广一年大概多少费用
迪庆藏族自治州,是云南省的8个自治州之一,首府香格里拉市。藏语意为“吉祥如意的地方”。位于云南省西北部,滇、藏、川三省区交界处,青藏高原伸延部分南北纵向排列的横断山脉,金沙江、澜沧江、怒江三江并流国家级风景名胜区腹地,澜沧江和金沙江自北向南贯穿全境,总面积23870平方千米。
迪庆藏族自治州管理1个县(德钦县)、1个自治县(维西傈僳族自治县),1个县级市(香格里拉市)。迪庆境内有26种民族,千人以上的有藏、傈僳、汉、纳西、白、回、彝、苗、普米等9个民族。
迪庆藏族自治州香格里拉市地处青藏高原南缘,横断山脉腹地,是滇、川、藏三省区交汇处,是英国著名作家詹姆斯·希尔顿在其长篇小说《消失的地平线》中,描绘的一个远在东方群山峻岭之中的永恒和平宁静之地——“香格里拉”。
html5+css3+svg+jq音量调节ui按钮特效
新建html文档。
书写hmtl代码。
<div id="icon" class="icon"> <svg
class="outline"
viewBox="0 0 216 216"
preserveAspectRatio="xMidYMid meet" >
<defs>
<linearGradient x1="16.291%" y1="13.917%" x2="88.893%" y2="80.425%" id="a">
<stop stop-color="#B0DBDD" offset="0%"/>
<stop stop-color="#0AA3C9" offset="100%"/>
</linearGradient>
</defs>
<g fill="none" fill-rule="evenodd">
<path d="M10 108c0-54.124 43.876-98 98-98s98 43.876 98 98-43.876 98-98 98-98-43.876-98-98z" stroke="rgba(0,0,0,.4)" stroke-width="6"/>
<path id="path" class="path" d="M10 108c0-54.124 43.876-98 98-98s98 43.876 98 98-43.876 98-98 98-98-43.876-98-98z" stroke="url(#a)" stroke-width="4"/>
</g>
</svg>
<div class="wheel">
<div id="indicator" class="indicator"></div>
</div>
</div>
<h1>鼠标按住中间的按钮拖动查看效果</h1>
书写css代码。
.icon > * { position: absolute; bottom: 0; top: 0; left: 0; right: 0; margin: auto; }
html, body { height: 100%; background: -webkit-radial-gradient(50% 0, circle, #3c3b4d 0%, #15131a 50%); background: radial-gradient(circle at 50% 0, #3c3b4d 0%, #15131a 50%); }
body { display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column; -webkit-align-items: center; -ms-flex-align: center; align-items: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; }
h1 { color: #FFF; text-align: center; margin: 50px 0 20px 0 }
h4 { color: #666; text-align: center; margin: 0 0 20px 0; font-size: 14px }
a, a:link { color: #666 }
.icon { width: 14em; height: 14em; border-radius: 3em; position: relative; -webkit-flex-shrink: 0; -ms-flex-negative: 0; flex-shrink: 0; box-shadow: 0 0.5em 2em rgba(0, 0, 0, 0.3), inset 0 0.2em 0.4em -0.2em rgba(255, 255, 255, 0.2), 0 0 0.2em rgba(0, 0, 0, 0.4); background: -webkit-linear-gradient(top, #3F3F4C, #191720); background: linear-gradient(to bottom, #3F3F4C, #191720); }
.wheel { width: 6em; height: 6em; border-radius: 50%; box-shadow: inset 0 0.1em 0.2em rgba(255, 255, 255, 0.2), 0 1em 2em 0.4em rgba(0, 0, 0, 0.5), 0 -1em 2em 0.1em rgba(255, 255, 255, 0.1); background: -webkit-linear-gradient(top, #525161, #322E3D); background: linear-gradient(to bottom, #525161, #322E3D); }
.wheel .indicator { width: 100%; height: 100%; }
.wheel .indicator:after { content: ''; display: block; position: absolute; background: #3B3A46; border-radius: 50%; width: .65em; height: .65em; top: .6em; left: 0; right: 0; margin: auto; box-shadow: 0 1px 1px -1px rgba(255, 255, 255, 0.4), inset 0 1px 1px rgba(0, 0, 0, 0.4); }
.outline { width: 12.5em; height: 12.5em; -webkit-transform: translateZ(0) rotateZ(90deg); transform: translateZ(0) rotateZ(90deg); }
.path { stroke-dasharray: 620; stroke-dashoffset: 620; }
@-webkit-keyframes path { 40% {
stroke-dashoffset: 100;
}
100% {
stroke-dashoffset: 620;
}
}
@keyframes path { 40% {
stroke-dashoffset: 100;
}
100% {
stroke-dashoffset: 620;
}
}
@-webkit-keyframes rotate { 40% {
-webkit-transform: rotateZ(320deg);
transform: rotateZ(320deg);
}
100% {
-webkit-transform: rotateZ(0);
transform: rotateZ(0);
}
}
@keyframes rotate { 40% {
-webkit-transform: rotateZ(320deg);
transform: rotateZ(320deg);
}
100% {
-webkit-transform: rotateZ(0);
transform: rotateZ(0);
}
}
.path { -webkit-animation: path 2s; animation: path 2s; }
.indicator { -webkit-animation: rotate 2s; animation: rotate 2s; }
书写index.js并添加js代码。
<script src='js/jquery.js'></script>
<script src='js/TweenLite.min.js'></script>
<script src='js/Draggable.min.js'></script>
<script src='js/CSSPlugin.min.js'></script>
<script src="js/index.js"></script>
<script>
var path = $('#path');
Draggable.create("#indicator", {
type: "rotation",
throwProps: true,
maxRotation: 360,
onDrag: function() {
var i = this.rotation;
path.css('stroke-dashoffset', 620*(1-i/360));
},
});</script>
代码整体结构。
查看效果。
北京时间 7 月 21 日消息,IBM 今天发布了 2020 财年第二季度财报。报告显示,按照美国通用会计准则 (GAPP)计算,IBM 第二季度总营收为 181.23 亿美元,较上年同期 191.61 亿美元下降 5.4%;净利润为 13.61 亿美元,较上年同期的 24.98 亿美元下降 45.5%。
IBM 第二季度净利润 13.61 亿美元,同比下降 45.5%
迪庆网站推广【迪庆官网推广哪个效果好】迪庆百度竞价推广托管、迪庆百度优化推广外包、迪庆全网霸屏推广多少钱、迪庆网络推广一年大概多少费用