In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces how to make DW mouse after the picture gradually darkens the effect, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor with you to understand.
Dreamweaver can achieve the effect that the picture gradually darkens when the mouse passes over the picture, how to make this effect?
1. Create a new html document, and then ctrl+s save it to the site
2. Create a div tag in body and insert a picture in div, as shown in the following figure
3. Create a block tag in div. The newly created H2 and img are of the same level and are a subset of div.
4. Enter the div attribute in style:
Div {width:400px;margin:0 auto;position:relative;}
Set the fixed width 400px, and the height is supported by a subset, so there is no need to set the height. Add relative positioning to the div.
5. Set the picture bar:
Img {display:block;width:100%;}
Turn the picture into a block and set the width as wide as the parent set.
6. Then set H2, overlay H2 on top of the picture, set width and height to 100%, adjust opacity, relative positioning: margin:0; removes the attributes of H2 itself.
H2 {position:absolute;width:100%;height:100%;background-color:black;top:0;left:0;opacity:0.5;margin:0;}
Now this effect is the final effect displayed after the mouse is moved over.
7. now the effect is that when the mouse passes over the picture, it slowly blackens, so you can first set the opacity to 0, and then slowly show up when the mouse passes over.
8. Then add pseudo-class effect:
Div:hover h2 {opacity:0.6;}
When the mouse passes over the div, H2 appears slowly, causing the picture to slowly blacken.
Thank you for reading this article carefully. I hope the article "how to make a mouse gradually darkens after a picture" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and follow the industry information channel. More related knowledge is waiting for you to learn!
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.