Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/81.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 有没有办法通过使用纯css创建div?_Html_Css - Fatal编程技术网

Html 有没有办法通过使用纯css创建div?

Html 有没有办法通过使用纯css创建div?,html,css,Html,Css,我正在编辑一个wordpress网站,我无法访问任何HTML,只能访问css。我只需要输入两行类似于“div”的文本。只有使用CSS才能做到这一点吗?好的,首先,您不能插入任何标记语言,但可以使用内容:“”插入内容您可以像这样使用:before或:after伪元素 p:before{ 颜色:红色; 显示:块; 内容:“这是来自css”; } 您好您可以使用:before或:after伪元素吗 div.class-name:after { content: 'text goes here

我正在编辑一个wordpress网站,我无法访问任何HTML,只能访问css。我只需要输入两行类似于“div”的文本。只有使用CSS才能做到这一点吗?

好的,首先,您不能插入任何标记语言,但可以使用
内容:“”插入内容

您可以像这样使用
:before
:after
伪元素

p:before{
颜色:红色;
显示:块;
内容:“这是来自css”;
}

您好

您可以使用:before或:after伪元素吗

div.class-name:after {
    content: 'text goes here';
    display: block;
    [style further as necessary]
}

这不应该被否决,因为它是一个真正的语句,不能使用CSS插入标记语言