使用 CSSbackground-origin属性设置内容框值。通过 content-box 值,背景图像从内容的左上角开始。
您可以尝试运行以下代码来实现 content-box 值:
现场演示
padding-box value
Heading 2
This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text.
Heading 3
This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text.border-box value
Heading 2
This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text.
Heading 3
This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text.content-box value
Heading 2
This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text.
Heading 3
This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text.
以上是CSS 内容框值的详细内容。更多信息请关注PHP中文网其他相关文章!