Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the mouse hover animation button realized by pure css3

2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how to use pure css3 to achieve the mouse hover animation button, I hope you will gain something after reading this article, let's discuss it together!

Html Code:

Css3 Code:

Body

{

Background-color: # 333

}

Div

{

Width: 200px

Height: 200px

Margin: 0 auto

}

Span

{

Position: relative

Width: 180px

Height: 180px

Display: block

Margin: auto

Top: 25px

Border: 20px solid rgba (255,255,0, .25)

Background-color: rgba (124, 155, 13, 1)

-webkit-transition: .5s

-moz-transition: .5s

-ms-transition: .5s

Transition: .5s

Border-radius: 30px 0px 30px 0px

}

Span:before, span:after

{

Position: absolute

Display: block

Background-color: # fff

Border-radius: 10px

Margin: auto

Top: 0px

Bottom: 0px

Left: 0px

Right: 0px

}

Span:before

{

Width: 100px

Height: 10px

Content: ""

}

Span:after

{

Width: 10px

Height: 100px

Content: ""

}

Div:hover span

{

-webkit-transform: scale (.5) rotate (45deg)

-moz-transform: scale (.5) rotate (45deg)

-ms-transform: scale (.5) rotate (45deg)

Transform: scale (.5) rotate (45deg)

Border-radius: 110px

Background-color: rgba (112, 18, 255, 1)

}

After reading this article, I believe you have a certain understanding of "how to use a pure css3 mouse hover animation button". If you want to know more about it, welcome to follow the industry information channel, thank you for reading!

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report