Get the App
SLTechnology News&Howtos  ›  Development  › 

How to achieve translucent background but opaque text by css

Shulou Source: shulou.com Published: 2022-06-01 10:39:36 10月01日 Update

This article mainly explains "css how to achieve translucent background but opaque text". The content in the article is simple and clear, easy to learn and understand. Please follow the editor's train of thought to study and learn "css how to achieve translucent background but opaque text".

Specific code:

Background translucent but text opaque body {background: # 40ed90;} # container {color: # 154BA0; background: # ff0000; filter: Alpha (Opacity=10, Style=0); opacity: 0.10; position: absolute; height: 200px; width:500px; zright index20;} # text {position: absolute; height: 200px; width:500px; text-align:center; z-index:30 The background is translucent but the text is opaque. Thank you for your reading. The above is the content of "css how to achieve translucent background but opaque text". After the study of this article, I believe you have a deeper understanding of how css achieves translucent background but opaque text, and the specific use still needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Text background learning content code that is ideas situations articles more knowledge knowledge points articles follow questions practice push research verification Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Shulou Technology Huawei vpn OPPO Reno