随笔分类 - css
            
    css
    
            
            
        
摘要:.link:before{content: "/";margin:0 24px;color: grey;} .link:first-child:before{display:none;}
        阅读全文
            
        
            
    html,body最顶层元素.
    
            
            
        
摘要:1,元素百比分是相对父元素,所有元素默认父元素是body. absolute,fixed[只有一个父元素,浏览器窗口]除外[浏览器窗口,为父元素].css3:vh,vw也永远相对,浏览器窗口.height: 10% == 10vh;absolute:height:100%和height:inheri
        阅读全文
            
        
            
    clearfix
    
            
            
        
摘要:过渡放在原:transiton:2s; 块无素:block,inline inline-block1,占一行,有宽,有高内元素:2,无宽高,内容撑开宽高。不支持上下margin.代码换行补解析。3, 一行,有宽,有高。不设宽度,要内容撑开。float:浮动元素.clearfix{*zoom:1;}.
        阅读全文
            
        
            
    animation
    
            
            
        
摘要:animation-name xxxanimation-duration 8sanimation-timing-function linear,ease,ease-in,ease-out,ease-in-out,cubic-bezier(n,n,n,n) 0到1animation-delay 0sa
        阅读全文
            
        
            
    都是以父元素的width为参照物的
    
            
            
        
摘要:本文依赖于一个基础却又容易混淆的css知识点:当margin/padding取形式为百分比的值时,无论是left/right,还是top/bottom,都是以父元素的width为参照物的!也许你会说,left/right以父元素的width为参照物好理解,但是top/bottom为什么也是以父元素的
        阅读全文
            
        
            
    换行,横向撑大,字符间距
    
            
            
        
摘要:word-break: break-all;换行 word-wrap: break-word 换行[换行后,如果不是一个word 还要换行]white-space: nowrap;不换行,横向撑大[ white-space:nowrap;overflow:hidden;] word-spacing:
        阅读全文
            
        
            
    cssTex
    
            
            
        
摘要:var head= document.getElementById("head");head.style.cssText="width:200px;height:70px;display:bolck";但cssText也有个缺点,会覆盖之前的样式。如TEST想给该div在添加个css属性widthd...
        阅读全文
            
        
            
    CSS  垂直居中。
    
            
    
摘要:1,display: table;display: table-cell Testaaaaaaaaaaaaaaaaaaa Testaaaaaaaaaaaaaaaaaaa display:flex;flex-direction: row | row-reverse | column |...
        阅读全文
            
        
 
                    
                 
 浙公网安备 33010602011771号
浙公网安备 33010602011771号