CSS - 内容css属性的含义

问题描述 投票:-4回答:3

我想知道那些内容css属性是什么意思

figure > figcaption::before{
   // what this propertie mean
   content: "*\002607\0000a0caption\A*";
   white-space: pre;
   font-style: italic;/*emphasized text*/
   font-variant: small-caps;
   font-size: 0.5em;
}
html css
3个回答
0
投票

CSS content Property

content属性与:before和:after伪元素一起使用,以插入生成的内容。

CSS语法

content: normal|none|counter|attr|string|open-quote|close-quote|no-open-quote|no-close-quote|url|initial|inherit;


div {
  width: 250px;
  height: 250px;
  background: blue;
  line-height: 250px;
  text-align: center;
}

h3 {
  color: white;
  position: relative;
}

h3:before{
  content: "\00a9";
  position: absolute;
  font-size: 20px;
  top: -5px;
  right: 0px;
}
<div>
  <h3>This is an example for css property content</h3>
</div>

0
投票

请注意,当您不使用时

内容:“\ 002607 \ 0000a0caption \ A”;

在你的程序中

<figcaption>

然后

<figcaption>

文本将不会填充

'弯曲的右箭头带有文字“CAPTION”'

<figcaption>文本的顶部。


-3
投票

我想这是符号代码,例如:

    <p>&#8630;</p>
© www.soinside.com 2019 - 2024. All rights reserved.