我将如何使用浏览器使图像缩放或使用CSS调整屏幕分辨率 [英] How would I make a image scale with the browser or screen resolution with css

查看:158
本文介绍了我将如何使用浏览器使图像缩放或使用CSS调整屏幕分辨率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为mybb论坛创建一个页面,并且添加了一些图像,并且希望它们根据屏幕分辨率进行缩放,因此,如果我的屏幕尺寸为17,则看起来与19"屏幕的尺寸相同.因为现在图像只是看起来一团糟.这是我正在处理的页面. http://crescentgaming.com/forums/test.php

I am working on a page for my mybb forum and I added some images and I want them to scale with the screen resolution so if I have a 17" it looks the same as someone with a 19" screen. Because right now the images just look all messed up. Here is the page that I am working on. http://crescentgaming.com/forums/test.php

推荐答案

尝试%而不是px单位 或使用@media并为任何分辨率指定尺寸 @media

try the % instead of the px unit or use @media and specify dimensions for any resolution @media

标准设备的CSS @media

我希望这会有所帮助 PS:在@media下,您只能为某些元素,ID或类指定更改,因此您不必重新设计孔页(据我所知),所以不要害羞尝试一下:)

I hope that will help PS: under the @media you can specify changes only for certain elements, ID or classes so you don't have to redesign the hole page (as far as I know) so don't be shy to give it a try :)

这篇关于我将如何使用浏览器使图像缩放或使用CSS调整屏幕分辨率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆