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
WBOYOriginal
2016-06-24 11:40:491242browse



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") ;
}
})

Statement:
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