在线教程

  • css color units

    ... , blue蓝, green绿…) 到特殊些的 (lawngreen草绿, orchid兰紫, crimson火红…)。 body{ color: black;} a{ color: orange;} 除了一些基本色外,我们不太会记得这么多颜色名称,所以这些颜色名称 ... 理解,而 hsl 便于被人类理解。 hsla 在 hsl 的基础上添加了alpha值: body{ color: hsl(4, 68%, 56%, 0.5);} 十六进制(Hexadecimal) CSS颜色还可以通过十六 ...

  • sass variables

    ... apart from defining a variable, in our case a shade of yellow: #fce473 We can then use it throughout our CSS, whenever a color unit is required: .quote{ border-left: 5px solid $yellow;} This .scss file will be compiled into a .css file, where all ...

  • css transitions

    ... 始状态、终止状态以及过渡过程来定义。 一个颜色转换的例子 转换(transitions)常被用于悬停状态 a{ background: lightgrey; color: grey;} a:hover{ background: yellow; color: red;} a.with-transition{ transition: 1s;} Without transition With transition 上面的第一个链接被悬停时,马上切换到了新的颜色,第二个链接在悬停时 ...

  • css priority

    ... gt; 我们分别使用标签(tag)、类(class)和ID选择器来设置元素的颜色: p{ color: blue;} .message{ color: green;} #introduction{ color: red;} 这3条CSS规则都选定了上述的p元素,但是浏览器只能用一种颜色来绘制 ... CSS将通过以下四步来计算每一个样式属性的权重: 对于一个给定的样式属性,例如color,先找出应用到某一个指定元素的所有CSS选择器(Selector) 根据声明的重要性和来源对选 ...

  • css gradients

    ... 况是一条从上到下的垂直线。 渐变颜色由一系列点来定义,如起点、终点和可选的中间点,也就是颜色停止点(color-stop point)。 起始点是渐变线颜色开始的点。它被定义为在渐变轴线和一条经由同象限的元素盒子顶角垂直线之 ... 或下),顺序其实无关紧要,而且都是可选的。 <angle> 代表渐变角度,从to top开始按顺时针方向旋转。 <color-stop> 代表渐变颜色停止点,由一个颜色值加上可选的停止位置组成,停止位置使用轴线方向上的百分比或像素长度来 ...

  • svg reference

    ... for a gradient offset="the offset for this stop (0 to 1/0% to 100%)". Required. stop-color="the color of this stop" stop-opacity="the opacity of this stop (0 to 1)" style Allows style sheets ...

  • sass extend

    ... a common CSS class like .small-uppercase combine the selectors use a Sass extend Common CSS Class .small-uppercase{ color: lightslategrey; font-size: 10px; letter-spacing: 0.1em; line-height: 12px; text-transform: uppercase;} Having a .small ...

  • css pseudo classes

    ... 。我们可以把这个伪类用于链接。因为悬停是最基本的链接交互动作。 a{ color: blue;} a:hover{ color: red;} 悬停在这个链接上,文本颜色会变红。 第一行定义所有的 < ... grey; padding: 5px;} .form-input:focus{ background: lightyellow; border-color: blue; outline: none;} :checked :checked伪类是CSS3引入的一个很棒 ...

  • css animations

    11.5 CSS 动画(animations) 时间维度上的状态序列组合 我们前面提到过,转换(transitions) 实际上就是一种特殊的CSS动画: 只有两个状态: 起始状态和终止状态 动画不会出现循环 中间状态只能由时变函数(transition-timing-function)来控制 实际动画需求要复杂得多,比如我们可能会需要: 自动播放的动画(不会有交互状态) 控制中间状态 ...

  • css selectors

    ... 体,表示某种类型的标签, 比如上面date的例子,我们想改变class为date的em标签的颜色为蓝色,可以把两个选择器拼接成如下的CSS规则: em.date { color: blue; } em.date 复合选择器包含: 一个标签(tag)选择器 em 一个类(class)选择器 .date 它将只对 <em class="date"></em> HTML元素起作用,而不会影响其他 .date 或 ...

推广服务(新)
最新文章