简体   繁体   English

如何使图像网格响应?

[英]How do I make an image grid responsive?

I'm pretty new to html/css, so please forgive me if this is a silly question.我对 html/css 很陌生,所以如果这是一个愚蠢的问题,请原谅我。 Basically, on my homepage I have several image grid icons which are hyperlinked to other pages on my site.基本上,在我的主页上,我有几个图像网格图标,它们超链接到我网站上的其他页面。 I'm really struggling to make it responsive though, if anyone could help me make it responsive that would be great!不过,我真的很难让它响应,如果有人能帮助我让它响应,那就太好了!

Here's my HTML and CSS.这是我的 HTML 和 CSS。 Please let me know anything I may be doing wrong!请让我知道我可能做错的任何事情!

 <a href="page1.html"> <div id="bor_panel"> <img src="page1.jpg"> <span>Page 1</span> </div> </a> <a href="page2.html"> <div id="bor_panel"> <img src="page2.jpg"> <span>Page 2</span> </div> </a> <a href="page3.html"> <div id="bor_panel"> <img src="page3.jpg"> <span>Page 3</span> </div> </a> <a href="page4.html"> <div id="bor_panel"> <img src="page4.jpg"> <span>Page 4</span> </div> </a> <a href="page5.html"> <div id="bor_panel"> <img src="page5.jpg"> <span>Page 5</span> </div> </a> <a href="page6.html"> <div id="bor_panel"> <img src="page6.html"> <span>Page 6</span> </div>

 #bor_panel { font-family: 'Bebas Neue', cursive; font-size: 2em; border-radius: 12px; border: 2px solid #000;s float: left; margin-top: 10px; margin-left: 16px; margin-right: 16px; width: 270px; height: 270px; display: flex; flex-direction: column; align-items: center; padding-left: 5px; padding-right: 5px; justify-content: space-between }

this class will do it add it up:这个类将把它加起来:

img-fluid        --Bootstarp3
img-resposive    --Bootstarp4

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM