随笔分类 - CSS
摘要:Definition and Usage The z-index property specifies the stack order of an element. An element with greater stack order is always in front of an elemen
阅读全文
摘要:由于 opacity 属性能被子元素继承,使用它设置父元素背景透明度时也会影响子元素.解决方法:1> 使用 RGBAExample1 .classname {2 /* RGBa, 透明度0.6 */3 background: rgba(0, 0, 0, 0.6);4 }2> 使用 o...
阅读全文
摘要:首先,选择器优先级顺序优先级逐级增加的选择器列表:通用选择器(*)元素(类型)选择器类选择器属性选择器伪类ID 选择器内联样式!important规则例外,该样式声明会覆盖CSS中任何其他的声明。一些经验法则:Never 永远不要在全站范围的 css 上使用 !importantOnly 只在需要覆...
阅读全文
摘要:Some examples1> Input width animationSearch: Code 1 2 3 4 14 15 16 Search: 17 18 View Code2> Shadow EffectShadow Button Shadow on HoverCode 1 2 3...
阅读全文
摘要:CSS3 2D Transforms Methodstranslate()rotate()scale()skewX()skewY()matrix()1> translate()The translate() method moves an element from its current posit...
阅读全文
摘要:CSS3 Shadow Effectstext-shadowbox-shadow1> text-shadowThe text-shadow property adds shadow to text.This property accepts a comma-separated list of sha...
阅读全文
摘要:CSS3 GradientsTwo types of gradients:Linear Gradients (goes down/up/left/right/diagonally)Radial Gradients (defined by their center)Linear Gradientssy...
阅读全文
摘要:CSS3 Rounded CornersThe border-radius property is a shorthand property for setting the four border-*-radius properties.syntaxborder-radius: 1-4 lengt...
阅读全文
摘要:Image Opacity / TransparencyThe CSS opacity property is a part of the CSS3 recommendation.Example1 img {2 opacity: 0.4;3 filter: alpha(opacity...
阅读全文
摘要:CSS CombinatorsFour different combinators in CSS3descendant selector (space)child selector (>)adjacent sibling selector (+)general sibling selector (~...
阅读全文
摘要:CSS Layout Examples of block-level elements: - Examples of inline elements:CSS displayThe display property specifies the type of box used for an HTML ...
阅读全文
posted @ 2015-12-28 23:45
提佰萬
摘要:CSS Tablesborderborder: border-width border-style border-color|initial|inherit;border-widthborder-width: medium|thin|thick|length|initial|inherit;bord...
阅读全文
摘要:CSS Text1> Text Colorused to set the color of the text2> Text Alignmentused to set the horizontal alignment of a texttext-align: left|right|center|jus...
阅读全文
摘要:Selectors/ Backgrounds/ Borders/ Margins/ Padding/ Height and WidthCSS Introduction:CSS stands for Cascading Style SheetsCSS describes how HTML elemen...
阅读全文
摘要:pointer-eventsSyntax 1 /* Keyword values */ 2 pointer-events: auto; 3 pointer-events: none; 4 pointer-events: visiblePainted; 5 pointer-events: visibl...
阅读全文
摘要:兼容主流浏览器的CSS透明代码:1 .transparent_class {2 filter:alpha(opacity=50);3 -moz-opacity:0.5;4 -khtml-opacity: 0.5;5 opacity: 0.5;6 }解析:opacity: 0.5; ...
阅读全文

浙公网安备 33010602011771号