我想列出所有可以从外部资源获取值(value)的 CSS 属性。 例如
<!DOCTYPE html>
<html>
<head>
<style>
body {
background: #ffffff url("http://www.w3schools.com/css/img_tree.png") no-repeat right top;
margin-right: 200px;
}
</style>
</head>
<body>
<h1>Hello World!</h1>
<p>Now the background image is only shown once, and it is also positioned away from the text.</p>
<p>In this example we have also added a margin on the right side, so that the background image will not disturb the text.</p>
</body>
</html>
如上例“background”从其他 URL 获取其资源。 像上面这样的其他 CSS 属性还有哪些,我在下面列出了其中的一些:
background-image
list-style-image
content
border-image-source
最佳答案
在 CSS 2.1 中,接受 <uri>
的完整属性列表值(value)是
-
background
(background-image
的简写) -
background-image
-
content
-
cue
(cue-after
和cue-before
的简写) -
cue-after
-
cue-before
-
cursor
-
list-style
(list-style-image
的简写) -
list-style-image
-
play-during
备注cue
, cue-after
, cue-before
和 play-during
定义在非规范性附录中,因此不需要 UA 来实现它们。
关于html - 可以从其他 url 获取的 CSS 的可能属性是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33414968/