项目中好用得css样式

 

效果一:

html:<a href="#">沙盒<i class="triangle"></i><i class="plus"></i></a>

css: a{position:relative;display:block;text-align:center;line-height:60px;}
         .triangle{display:block;width:0;height:0;border-right:15px solid transparent;position:absolute;top:0;left:0;z-  index:2;}
         .plus{display:block;width:0;height:0;border-bottom:15px solid #fff;border-left:15px solid transparent;position:absolute;top:1px;left:1px;z-index:2;}
        a:hover .triangle{border-top:15px solid #fff;}
        a:hover{background:#f38ce3;color:#fff;}

 

  

效果二:

html:<i class="num">4</i>

css:num { position: relative;display: inline-block;width: 16px;height: 16px;line-height: 16px;border: 1px solid #999;font-size: 12px;color: #999;text-align: center;}

        .num:before{content: '';display:block;width:0;height:0;border-right:5px solid transparent;border-top: 5px solid #fff;position:absolute;top:-1px;left:-1px;z-index:2;}
       .num:after{content: '';display:block;width:1px;height:6px;-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);filter: progid:DXImageTransform.Microsoft.BasicImage(Rotation=0.45);transform: rotate(45deg);background-color: #666;position:absolute;top:-1px;left:1px;z-index:2;}

效果三:

html:<div class="circleList">
                   <ul>
                          <li><a title="999" href="#" target="_blank"><p>最新进口</p></a></li>                                                                                              <li><a title="999" href="#" target="_blank"><p>最新进口</p></a></li>
                           <div class="line"></div>
                   </ul>                 
            </div>

css:.hotArea ul{position: relative;padding: 12px 9px;max-height: 181px;border: 1px solid #e5e5e5;border-top: 0;border-bottom-left-radius: 5px;border-bottom-right-radius: 5px;overflow: hidden;}
.hotArea li{position:relative;overflow: hidden;}
         .hotArea li a{display: block;margin-left: 20px;}
         .hotArea .circleList ul .line{ position:absolute; left:12px; top:27px; width:1px;background-color:#dde1e8;}
         .hotArea li p{display:block;width: 246px;height:32px;line-height:32px;font-size: 15px;color: #353533;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
          .hotArea li:hover p{color: #fa6400;text-decoration: underline;}
          .hotArea li:before{content:"";position:absolute;z-index:3; width:3px; height:3px; background:#fff; border:1px solid #dde1e8; border-radius:50%; -webkit-border-radius:50%;left:1px;top:15px;}
           .hotArea li:hover:before{width:6px; height:6px;background-color: #fd8042;border-color: #fd8042;left: 0;}

js:   if($(".circleList").length > 0){
        $(".circleList ul").each(function(){
            var circleHeight = $(this).height();
            var liHeights = $(".circleList ul li").height();
            var circleHeights = $(this).children(".line").height();
            circleHeights = circleHeight - liHeights;
            $(this).children(".line").css('height',circleHeights);    
        })    
    }

效果四:

html:<span></span>

css:span{display: inline-block;width: 6px;height: 6px;border-radius: 50%;position: relative;margin: 0 7px;background-color: #FFF;}

span:before{box-sizing: border-box; display: inline-block;position: absolute;content: '';width: 14px;height: 14px;left: -4px;top: -4px;border-radius: 50%;border: 2px solid #FA0;box-shadow: 0 0 9px 0 #FA0;background-color: transparent;}

效果五:

html:<img />(左右一直循环摇摆)

css:.fhyx_fhfd_li .bg_img{position: absolute;left: 0;top: 0;width: 100px;-webkit-transition: width .3s ease-in, bottom .3s ease-in, left .3s ease-in;transition: width .3s ease-in, bottom .3s ease-in, left .3s ease-in;transform: rotate(-15deg);transform-origin: center top;animation: scal 0.7s ease-in-out 0s infinite alternate;}
@keyframes scal { 0% {transform: rotate(-15deg);} 100% {transform: rotate(15deg);} }

效果六:

html:<ul> <ul />(只谷歌支持)

css:ul { height: 290px;overflow-y: auto;overflow-x: hidden; position: relative; margin: 13px 14px 0 33px;}
         ul::-webkit-scrollbar {  width: 2px;}
         ul::-webkit-scrollbar-thumb {width: 2px; height: 158px; background: #4d70e2;}

 

 

 

 

 

 

 

 

 

 

很好用的CSS,960 Grid System Version 1.5 2010-05-11 Created by Nathan Smith. See the official site for more info: http://960.gs/ ============================================================================ Thank you for downloading the 960 Grid System. I hope it helps to streamline web development workflow. Enclosed in the bundle are printable sketch sheets and template files for Adobe Fireworks and Photoshop, OmniGraffle and Visio. Also included is a lightweight CSS file, which contains the grid dimensions. To use this file, simply include the 960.css in the <head> of the HTML page. You may also use the reset.css and text.css files, or opt to leave them out. Here is an example of the XHTML code necessary to incorporate the CSS files: <head> <link rel="stylesheet" type="text/css" media="all" href="css/reset.css" /> <link rel="stylesheet" type="text/css" media="all" href="css/text.css" /> <link rel="stylesheet" type="text/css" media="all" href="css/960.css" /> </head> It is worth noting that these styles do not automatically make up a finished site design. They are simply a starting point, ideally for rapid prototyping or as a basis for creating your own designs. You should not feel constrained by the way I have built the initial code. If you disagree with how something has been done, feel free to revise it for the needs of your particular site. The files in the 960 Grid System are free of charge, licensed under GPL/MIT. ============================================================================ Note that if you are building a site in a language which reads from right to left, use the CSS files that begin with "rtl_" instead. Denote the language: <html lang="..." dir="rtl"> Be sure to replace "..." with the appropriate two-letter abbreviation of the language you are using. Example: lang="he" for Hebrew, lang="ar" for Arabic. ============================================================================ Special thanks to Eric Meyer for his comprehensive browser reset stylesheet. http://meyerweb.com/eric/tools/css/reset/
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值