随笔分类 -  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 阅读全文
posted @ 2016-02-19 10:14 提佰萬 阅读(205) 评论(0) 推荐(0)
摘要:由于 opacity 属性能被子元素继承,使用它设置父元素背景透明度时也会影响子元素.解决方法:1> 使用 RGBAExample1 .classname {2 /* RGBa, 透明度0.6 */3 background: rgba(0, 0, 0, 0.6);4 }2> 使用 o... 阅读全文
posted @ 2016-01-04 10:29 提佰萬 阅读(8105) 评论(0) 推荐(1)
摘要:首先,选择器优先级顺序优先级逐级增加的选择器列表:通用选择器(*)元素(类型)选择器类选择器属性选择器伪类ID 选择器内联样式!important规则例外,该样式声明会覆盖CSS中任何其他的声明。一些经验法则:Never 永远不要在全站范围的 css 上使用 !importantOnly 只在需要覆... 阅读全文
posted @ 2016-01-01 22:29 提佰萬 阅读(213) 评论(0) 推荐(0)
摘要: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... 阅读全文
posted @ 2016-01-01 18:09 提佰萬 阅读(260) 评论(0) 推荐(0)
摘要:CSS3 2D Transforms Methodstranslate()rotate()scale()skewX()skewY()matrix()1> translate()The translate() method moves an element from its current posit... 阅读全文
posted @ 2016-01-01 14:58 提佰萬 阅读(241) 评论(0) 推荐(0)
摘要:CSS3 Shadow Effectstext-shadowbox-shadow1> text-shadowThe text-shadow property adds shadow to text.This property accepts a comma-separated list of sha... 阅读全文
posted @ 2016-01-01 13:37 提佰萬 阅读(206) 评论(0) 推荐(0)
摘要:CSS3 GradientsTwo types of gradients:Linear Gradients (goes down/up/left/right/diagonally)Radial Gradients (defined by their center)Linear Gradientssy... 阅读全文
posted @ 2016-01-01 12:28 提佰萬 阅读(275) 评论(0) 推荐(0)
摘要:CSS3 Rounded CornersThe border-radius property is a shorthand property for setting the four border-*-radius properties.syntaxborder-radius: 1-4 lengt... 阅读全文
posted @ 2015-12-30 15:56 提佰萬 阅读(319) 评论(0) 推荐(0)
摘要:Image Opacity / TransparencyThe CSS opacity property is a part of the CSS3 recommendation.Example1 img {2 opacity: 0.4;3 filter: alpha(opacity... 阅读全文
posted @ 2015-12-30 15:33 提佰萬 阅读(357) 评论(0) 推荐(0)
摘要:CSS CombinatorsFour different combinators in CSS3descendant selector (space)child selector (>)adjacent sibling selector (+)general sibling selector (~... 阅读全文
posted @ 2015-12-30 14:27 提佰萬 阅读(241) 评论(0) 推荐(0)
摘要: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... 阅读全文
posted @ 2015-12-28 00:29 提佰萬 阅读(367) 评论(0) 推荐(0)
摘要: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... 阅读全文
posted @ 2015-12-25 17:04 提佰萬 阅读(246) 评论(0) 推荐(0)
摘要:Selectors/ Backgrounds/ Borders/ Margins/ Padding/ Height and WidthCSS Introduction:CSS stands for Cascading Style SheetsCSS describes how HTML elemen... 阅读全文
posted @ 2015-12-25 15:10 提佰萬 阅读(223) 评论(0) 推荐(0)
摘要:pointer-eventsSyntax 1 /* Keyword values */ 2 pointer-events: auto; 3 pointer-events: none; 4 pointer-events: visiblePainted; 5 pointer-events: visibl... 阅读全文
posted @ 2015-12-24 16:57 提佰萬 阅读(400) 评论(0) 推荐(0)
摘要:兼容主流浏览器的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; ... 阅读全文
posted @ 2015-09-19 21:55 提佰萬 阅读(492) 评论(0) 推荐(0)