In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "css how to achieve text opaque background translucent effect", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "css how to achieve text opaque background translucent effect" bar!
Methods: 1, use width and height attributes to set the size of the text element the same as the parent element; 2, use the background attribute and rgba () function to achieve the text opaque background translucent effect, syntax "text element {background:rgba (255pr 255, transparent value);}".
The operating environment of this tutorial: windows7 system, CSS3&&HTML5 version, Dell G3 computer.
How to realize the translucent effect of text opaque background by css
In css, you can take advantage of the position attribute and set it to the absolute bit text element to generate absolute positioning, relative to the first parent element other than static positioning. Make it absolutely positioned relative to the picture element.
Then use the background property and the rgba () function to set the transparency of the background image.
Let's take a look at how to set the text opaque background translucent effect through an example, as follows:
Document. Demo2-bg {background: url (1118.02.png); background-size: cover; width: 500px; height: 300px; position: relative;} .demo2 {width: 500px; height: 300px; background:rgba
Output result:
Thank you for your reading, the above is "css how to achieve text opaque background translucent effect" content, after the study of this article, I believe that css how to achieve text opaque background translucent effect of this problem has a deeper understanding, the specific use of the need for you to practice and verify. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.