我们可以打开「Things.css」来查看,使用Ctrl + F对「--h1-color」进行检索,马上就能看到「--h1-color: var(--text-normal)」,原来「--h1-color」的值又是由「--text-normal」所决定的。我们继续检索「--text-normal」,会发现「--text-normal」有两个值,这是因为 Obsidian 的外观有深色和浅色两种模式,所...
「CSS变量」又叫「CSS自定义属性」,为什么会突然提起这个很少人用到的东西呢?因为最近在重构个人官网,不知道为什么突然喜欢用上「CSS变量」,可能其自身隐藏的魅力,让笔者对它刮目相看。 谈到为什么会在CSS中使用变量,下面举个栗子,估计大家一看就会明白。 代码语言:javascript 代码运行次数:0 运行 AI代码解释 /* ...
这里有很多值可选 (比如-light,-normal,-bold,-extrabold,-black, 等等), 不过事实上你很少会用到normal和bold以外的值: normal,bold: 普通或者加粗的字体粗细 lighter,bolder: 将当前元素的粗体设置为比其父元素粗体更细或更粗一步。100–900: 数值粗体值,如果需要,可提供比上述关键字更精细的粒度控制。 tex...
外部式css样式(也可称为外联式)就是把css代码写一个单独的外部文件中,这个css样式文件以“.css”为扩展名,在<head>内(不是在<style>标签内)使用<link>标签将css样式文件链接到HTML文件内,如下面代码:<link href="base.css" rel="stylesheet" type="text/css" /> 注意: css样式文件名称以有意义的英文字母...
25font-weight:bold; 26text-align:center; 27text-shadow:1px1px1px#ccc; 28... 29 30/*border and background*/ 31border:1pxsolid#ccc; 32background-color:#ccc; 33... 34 35/*other*/ 36overflow:hidden; 37opacity: .8; 38filter: alpha(opacity=80); ...
The following snippet of text is rendered as bold text. <strong>rendered as bold text</strong> Italics For emphasizing a snippet of text with italics. The following snippet of text is rendered as italicized text. <em>rendered as italicized text</em> Alternate elements Feel free to use <b>...
CSS Button Generator is a free online tool to create CSS buttons without code. Use our premade templates to easily generate CSS buttons
CSS结果 font-weight: bold; 演示 font-style: italic; 演示 text-decoration: line-through; 演示text-decoration 不同于用于修改字体显示的其他选项。 主要区别在于,text-decoration 用于在文本周围或文本之上应用样式,但不会修改实际字体本身。 粗体和斜体会修改字体。备注...
z-index: 1; font-size: inherit; font-family: inherit; font-weight: bold; ...
h3{font-weight:bold; } 推荐的写法: h3{font-weight:bold; } 6. 多个选择器和声明都独占一行 不推荐的写法: h1,h2,h3{font-weight:normal;line-height:1.5; } 推荐的写法: h1,h2,h3{font-weight:normal;line-height:1.5; } 7. 每个规则集之间保留一个空行 ...