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/03 Report--
This article mainly explains "how to solve the problem that multi-line picture hover plus border will squeeze the following pictures elsewhere." Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let Xiaobian take you to learn "how to solve the problem that multi-line picture hover plus border will squeeze the following pictures elsewhere"!
Question:
When you encounter images arranged in multiple rows and columns, adding a border to the hover will squeeze the images below into other places.
============================================================
Note:
IE11 The following browsers load images with a 1px border by default
Solution: Set border:none for pictures
=============================================================
Hover border solution:
Originally:
The code is as follows:
1. Set transparent borders for elements (recommended):
The code is as follows:
li{
border:2px solid transparent;
}
li:hover{
border:2px solid red;
}
2. Wrap an element with a div
After change:
The code is as follows:
Style:
The code is as follows:
li{
wdith:468px;
}
div{
width:468px;
margin:2px;
padding:10px;
background-color:#fff;
}
div :hover{
margin:0;
border:2px solid red;
}
In addition:
Outlines IE 7 and 8 are not supported.
But it is displayed above the element without bounding it. Regardless of IE compatibility, you can directly replace border with outline.
At this point, I believe everyone has a deeper understanding of "how to solve the problem that the hover of multi-line pictures and the border will squeeze the following pictures elsewhere." It is advisable to actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue 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.