当前位置:网站首页>Effect of shadow around the block after mouse over
Effect of shadow around the block after mouse over
2022-06-30 14:32:00 【Domineering ape General Manager】
This effect is actually very simple , Just add one to the element :hover pseudo-classes , And add css3 Of box-shadow attribute , The visual suspension can be realized by establishing a projection outward .
Don't talk much , On dry :
html:
<div class="hh"> Xiao Yao shows you how shadows appear </div>
css:
.hh{
width: 300px;height: 100px; margin:30px;background: wheat;}
.hh:hover{
box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.24);}
effect :
Does it look like a card float ? If you want to become larger and resuspend on the original basis, it is also very simple ( add to :before pseudo-classes ). Keep looking down :
html:
<div class="hh"> Xiao Yao shows you how shadows appear </div>
**```
css:**
```css
.hh{ width: 300px;height: 100px; margin:30px;position: relative;background: wheat;}
.hh:before{ content: ''; position: absolute; left: -16px; right: -16px;top:-18px;bottom: -18px;}
.hh:hover:before{box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.24); }
effect :
Finally, expand the concept a little ( Go to Baidu online for details ):
boxShadow Attribute is to add one or more drop-down shadows to the box . Every shadow is made by 2-4 Length value 、 An optional color value and an optional inset Key words . The attribute values represent :x Shaft offset 、y Shaft offset 、 Fuzzy range ( Optional )、 Diffusion range ( Optional )、 Color ( Optional )、 Whether the projection is inward ( Optional , Default outward ).
边栏推荐
- Thoughts on the security of a PHP file name regular verification
- PHP common authentication / third-party methods
- JMeter transaction controller
- Realize a simple LAN communication (similar to feiqiu)
- Three uses of golang underscores
- Apache Doris comparison optimization Encyclopedia
- Deep understanding Net (2) kernel mode 4 Summary of kernel pattern constructs
- Fastcgi CGI shallow understanding
- Problems in QT creator (additional unknown and error lines are listed in the debug output window)
- Shell programming overview
猜你喜欢

Intelligent operation and maintenance: visual management system based on BIM Technology

More than 20 years after Hong Kong's return, Tupu digital twin Hong Kong Zhuhai Macao Bridge has shocked

Why does the folder appear open in another program

Attack and defense world web questions

Mysql database foundation: stored procedures and functions

DiceCTF - knock-knock

【BUUCTF】 Have Fun

This editor will open source soon!

XSS challenge (6-10) more detailed answers

用Unity实现Flat Shading
随机推荐
Zend studio how to import an existing project
Problem: wechat developer tool visitor mode cannot use this function
Why does the folder appear open in another program
Numpy creates an empty array data = np empty(shape=[1, 64,64,3])
Att & CK red team evaluation field (I)
I'd like to ask you, where can I open an account in Foshan? Is it safe to open a mobile account?
Uniapp upload image method
Attack and defense world web questions
【Kubernetes系列】K8s设置MySQL8大小写不敏感
Wechat applet realizes map navigation + door-to-door recycling
深入理解.Net中的线程同步之构造模式(二)内核模式4.内核模式构造物的总结
Google Earth engine (GEE) - ghsl: global human settlements layer, built grid 1975-1990-2000-2015 (p2016) data set
Cost forecast of PMP (BAC, EAC, etc)
PHP recursive multi-level classification, infinite classification
Lifting scanning tool
1 figure to explain the difference and connection between nodejs and JS
Configuration of headquarters dual computer hot standby and branch infrastructure for firewall Foundation
[geek challenge 2019] PHP problem solving record
Go language for loop multivariable use
Laravel RBAC laravel permission use