18910140161

html-如果我在第一行伪类中放置不透明:0它不工作,你知道为什么吗-堆栈溢出

顺晟科技

2022-10-19 14:07:36

223

如果我将不透明度:0放在第一行伪类中,它不工作,你知道为什么会有优先级问题吗。

CSS代码:

p::first-line{
    color : green;
    font-size : 30px;
    opacity : 0
}


<p>Really can't remember where I left my spine
        Carrying my body in a bag for dimes
        Hidden in the pages of the New York Times at home
        And maybe I'll be better if I take my meds
        Ain't a double header if you lose your head
        Tried a medication that I bought instead</p>

顺晟科技:

不透明度不是可以用于第一行样式的值之一。

您可以设置颜色,但透明可能会给您带来您想要的外观。

不能在伪类中使用所有类型的CSS属性。以下是允许使用的属性列表-https://developer.mozilla.org/en-美国/docs/web/css/:::first-line#allowable_properties.

您可以根据您的要求尝试使用或使用属性。设置它可能满足您的需要。

  • TAG:
相关文章
我们已经准备好了,你呢?
2024我们与您携手共赢,为您的企业形象保驾护航