[英]I have a table composed of 5 images, how can i style this table so that it will scale proportionally on multiple browser sizes?
The image table looks fine except when you shrink the browser size and then the table expands past the window size. 图像表看起来不错,除非您缩小浏览器大小,然后该表扩展到窗口大小以外。 I don't need the table to be responsive (it is only 5 images), I need the table to scale with the browser size. 我不需要表格进行响应(只有5张图像),我需要表格随浏览器大小进行缩放。
Here is the JSFiddle link 这是JSFiddle链接
http://jsfiddle.net/gacujuvx/ http://jsfiddle.net/gacujuvx/
this is how i styled one image in the stylesheet. 这就是我在样式表中设置一个图像样式的方式。
.comfyone {
width:570px;
height:214px;
background:url(http://104.131.100.112/wp-content/uploads/2015/01/1stad1.jpg);
background-size:cover;
}
You can see the html table in the JSfiddle example I provided. 您可以在我提供的JSfiddle示例中看到html表。
If somebody could provide an answer that works, I would be very appreciative. 如果有人可以提供一个可行的答案,我将不胜感激。
If you need the table to scale then you do need the table to be responsive. 如果您需要表格缩放,那么您确实需要表格做出响应。 What do you think responsiveness is if not scaling depending on browser size? 如果不根据浏览器的大小进行缩放,您认为响应性是什么?
.comfyone {
width:20%;
}
set your width and height in percentages so their size is based on the size of the screen 以百分比设置您的宽度和高度,以便它们的大小基于屏幕的大小
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.