Home > Web Front-end > HTML Tutorial > How to increase the height without affecting the document flow of float left_html/css_WEB-ITnose

How to increase the height without affecting the document flow of float left_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:40:49
Original
1240 people have browsed it



Each product is left floating, and the float is cleared every five products. What I want to ask is
How can I prevent the following products from falling when I hover? (Red line in the picture).
I don’t have any ideas in my mind and I don’t know any way to achieve it.


Reply to discussion (solution)

Set a uniform height and center the image

$(document).ready(function() {
var li_a=$(".a").height();
var li_b=$(".b").height();
if (li_a $ (".a").css("height",rheight "px");
}else
{
$(".b").css("height",lheight "px") ;
}
})

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template