Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
您好我正在尝试使用以下代码在输入字段后隐藏一个跨度:
<style> input~span:after { opacity: 0;} </style> ... <input type="email" /> <span>Test</span>
但是跨度仍然显示在浏览器中但是如果我用萤火虫检查元素,它告诉我跨度有不透明度:0;
我错过了什么吗?
为什么:after?那是为了创建伪元素..
:after
<style> input~span{ opacity: 0;} </style>