admin管理员组

文章数量:1336576

How do you make a div disappear when reducing window width, leaving it's plete space available to other elements? I do not mean hiding piece by piece on overflow, but the whole element.

I came across this brilliant feature on the following URL:

Is javascript required or can it be done with CSS? I noticed the page is pretty much HTML5.

How do you make a div disappear when reducing window width, leaving it's plete space available to other elements? I do not mean hiding piece by piece on overflow, but the whole element.

I came across this brilliant feature on the following URL: http://flexslider.woothemes.

Is javascript required or can it be done with CSS? I noticed the page is pretty much HTML5.

Share Improve this question asked Aug 11, 2012 at 1:38 timtim 2,7303 gold badges32 silver badges48 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 6

You can do this with just CSS:

@media all and (max-width: 480px) {
  .mydiv { display: none; }
}

本文标签: javascriptMake div disappear when reducing window widthStack Overflow