作者文章

Sunkanmi Fafowora

文章“border-image-outset”的直链

border-image-outset

CSS 的 `border-image-outset` 属性设置元素的 `border-image` 区域与其超出元素 `border-box` 的距离。

.container {
  border-style: ridge;
  border-width: 3rem;
  border-image-source: url('path/to/image.jpg');
  border-image-slice: 70; 
  border-image-width: 40%; 
  border-image-repeat: repeat;
  border-image-outset: 2;
}
文章“border-image-width”的直链

border-image-width

CSS 的 `border-image-width` 属性用于确定边框图像文件的宽度,该宽度由 CSS 的 `border-image-source` 属性提供。

.container {
  border-style: ridge;
  border-width: 3rem;
  border-image-source: url('path/to/image.jpg');
  border-image-slice: 70; 
  border-image-width: 40%;
  border-image-repeat: repeat; 
}
文章“border-image-slice”的直链

border-image-slice

CSS 的 `border-image-slice` 告诉浏览器在哪里“切片”用于创建元素边框部分的图像。

.element {
  border-style: ridge;
  border-width: 3rem;
  border-image-source: url('path/to/image.jpg');
  border-image-slice: 30%;
  border-image-repeat: repeat; 
}

`border-image-slice` 属性定义在…

文章“border-image-source”的直链

border-image-source

CSS 的 `border-image-source` 属性使用图像文件或 CSS 渐变作为源创建围绕元素的边框。

.container {
  border-width: 2rem;
  border-style: dotted;
  border-color: grey;
  border-image-source: url('path/to/image.jpg');
  border-image-repeat: repeat;
  border-image-slice: 100;
}
文章“:autofill”的直链

:autofill

CSS 中的 `:auto-fill` 伪类允许我们为包含浏览器自动填充内容的 `` 元素设置样式。

以新的用户注册表单为例。您是否曾经点击过某个字段并看到下拉菜单…

文章“::file-selector-button”的直链

::file-selector-button

CSS 中的 `::file-selector-button` 是一个伪元素,它选择 HTML 中的 ``。

input::file-selector-button {
  background-color: #f8a100;
}

您无疑遇到过文件上传输入框——它们非常常见,尤其是在表单中包含文件附件时,例如 PDF…

文章“:right”的直链

:right

CSS 中的 `:right` 伪类与 `@page` at-rule 一起使用,用于选择包含多个页面的打印文档中的所有右侧页面。这对于设置双面页面的边距非常方便,以便“右侧”页面…

文章“:left”的直链

:left

CSS 中的 `:left` 伪类与 `@page` at-rule 一起使用,用于选择包含多个页面的打印文档中的所有左侧页面。这对于设置双面页面的边距非常方便,以便“左侧”页面…