html圆环(该代码非原创,具体出处已不详)

<!doctype>
<html>
    <head>
        <title></title>
        <meta charset="utf-8">
    </head>
    <style>
        .circle {
            width: 200px;
            height: 200px;  
            position: absolute;
            border-radius: 50%;
            background: red;
        }
        .pie_left, .pie_right {
            width: 200px;
            height: 200px;
            position: absolute;
            top: 0;left: 0;
        }
        .left, .right {
            display: block;
            width:200px;
            height:200px;
            background:#00aacc;
            border-radius: 50%;
            position: absolute;
            top: 0;
            left: 0;
            
        }
        .pie_right, .right {
            clip:rect(0,auto,auto,100px);
        }
        .pie_left, .left {
            clip:rect(0,100px,auto,0);
        }
        .mask {
            width: 160px;
            height: 160px;
            border-radius: 50%;
            left: 20px;
            top: 20px;
            background: #FFF;
            position: absolute;
            text-align: center;
            line-height: 150px;
            font-size: 16px;
        }
    </style>
    <script src="js/jquery.js"></script>
    <script>
    $(function() {
    $(‘.circle‘).each(function(index, el) {
        var num = $(this).find(‘span‘).text() * 3.6;
        if (num<=180) {
            $(this).find(‘.right‘).css(‘transform‘, "rotate(" + num + "deg)");
        } else {
            $(this).find(‘.right‘).css(‘transform‘, "rotate(180deg)");
            $(this).find(‘.left‘).css(‘transform‘, "rotate(" + (num - 180) + "deg)");
        };
    });

});

</script>
    
    <body>
    <div class="circle">
        <div class="pie_left">
            <div class="left"></div>
        </div>
        <div class="pie_right">
            <div class="right"></div>
        </div>
        <div class="mask">
            <span>10</span>%
        </div>
    </div>
    </body>
</html>

时间: 2024-07-30 08:01:04

html圆环(该代码非原创,具体出处已不详)的相关文章

base64编码及JNI实现,代码非原创,只做整理和实现JNI端交互

直接上代码: #include <stdlib.h> #include <stdio.h> #include <getopt.h> #include <string.h> #include "base64.h" extern "C" { //Base64 编码 int Base64Encode(unsigned char *OrgString, unsigned char *Base64String, int OrgS

扫描线题目汇总 (里面的题解和代码非原创)

hdu 3867 Light and Shadow 转载自:http://blog.csdn.net/accry/article/details/6676009 题意: 原子弹爆炸,一些互不相交的线段,求能辐射到的线段个数(可以将原子弹爆炸点视为泛光源) 分析: 以辐射源为中心对周围的点按照极坐标角度进行排序,然后在极坐标上使用扫描线方法.维护一个集合,集合内的元素是与扫描线相交的线段,排序依据是线段与扫描线的交点到辐射源的距离.该集合中的最小元素就是被照射到的线段. 有关容器(set)排序依据

新辰:SEOer如何降低非原创文章带来的影响?

1.相关资料 官方文档:http://htmlparser.sourceforge.net/samples.html API:http://htmlparser.sourceforge.net/javadoc/index.html 其它HTML 解释器:jsoup等.由于HtmlParser自2006年以后就再没更新,目前很多人推荐使用jsoup代替它. 2.使用HtmlPaser的关键步骤 (1)通过Parser类创建一个解释器 (2)创建Filter或者Visitor (3)使用parser

Linux下high CPU分析心得【非原创】

非原创,搬运至此以作笔记, 原地址:http://www.cnitblog.com/houcy/archive/2012/11/28/86801.html 1.用top命令查看哪个进程占用CPU高gateway网关进程14094占用CPU高达891%,这个数值是进程内各个线程占用CPU的累加值. PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND     14094 root      15   0  315m 

Java Interface 是常量存放的最佳地点吗?(转帖学习,非原创)

Java Interface 是常量存放的最佳地点吗?(转帖学习,非原创) 由于java interface中声明的字段在编译时会自动加上static final的修饰符,即声明为常量.因而interface通常是存放常量的最佳地点.然而在java的实际应用时却会产生一些问题. 问题的起因有两个,第一,是我们所使用的常量并不是一成不变的,而是相对于变量不能赋值改变.例如我们在一个工程初期定义常量∏=3.14,而由于计算精度的提高我们可能会重新定义∏=3.14159,此时整个项目对此常量的引用都应

有关中小非原创小说网站SEO的思考

晃眼两年过去了,12年后自己开了家小公司,线下实体,网站这块都荒废了,前段时间闲着没事又捡起了闲置的域名,两年多没做了,只剩下不到20个域名,随便选了几个准备做小说网挂着,心不大,服务器和域名的费用收回就够了. 刚开始建了三个,本地调试好,放服务器应该不到3个小时,首页就被百度收录,这一点来说现在百度还是相对做的很不错的,是最快的(未发新外链),其次就是360搜索,大概第二天到第三天陆续收录了首页,最慢的当属搜狗了差不多接近一周才收录(如果不是小说站我是不会考虑搜狗的).其中一个相对比较幸运,开

CSS样式命名整理(非原创)

非原创,具体出自哪里忘了,如果侵害您的利益,请联系我. CSS样式命名整理 页面结构 容器: container/wrap 整体宽度:wrapper 页头:header 内容:content 页面主体:main 页尾:footer 导航:nav 侧栏:sidebar 栏目:column 中间内容:center 导航 导航:nav 导航:mainbav/globalnav 子导航:subnav 顶导航:topnav 边导航:sidebar 左导航:leftsidebar 右导航:rightside

发现一段精简的模板算法(非原创)

引用自: http://ejohn.org/blog/javascript-micro-templating/ // Simple JavaScript Templating // John Resig - http://ejohn.org/ - MIT Licensed (function(){ var cache = {}; this.tmpl = function tmpl(str, data){ // Figure out if we're getting a template, or

字符串相似度计算的方法,使用SQL以及C#实现,本文非原创摘自网络(.NET SQL技术交流群入群206656202需注明博客园)

1 CREATE function get_semblance_By_2words 2 ( 3 @word1 varchar(50), 4 @word2 varchar(50) 5 ) 6 returns nvarchar(4000) 7 as 8 begin 9 declare @re int 10 declare @maxLenth int 11 declare @i int,@l int 12 declare @tb1 table(child varchar(50)) 13 declare