视觉网络开发人员调整“所有图像”的大小 一起?

发布于 2024-07-13 03:03:36 字数 142 浏览 7 评论 0原文

我在 Visual Web Developer 中遇到了一个关于图像的奇怪问题,

我无法从属性面板更改图像属性(我的更改不会生效),并且

当我调整一张图像的大小时(通过拖动边框),所有图像都得到新的尺寸吗?

任何想法?

I have a weird problem with images in visual web developer,

I cant change my images properties from properties panel (my changes don't take effect) and all images in my website have gotten the same size

when I resize one image (by dragging the border), all images get that new size?

any idea?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

沉默的熊 2024-07-20 03:03:36

视觉 Web 开发人员以某种方式读取 CSS 文件中的图像类而不是控件的属性,因为我的 CSS 文件中有类似这样的内容:

img {
width:260px;
}

Somehow visual web developer read the image class in the CSS file instead of the properties of the control because there is something like this in my CSS file:

img {
width:260px;
}
樱花坊 2024-07-20 03:03:36

是的,基本上 HTML 的宽度和高度属性已经被弃用了一段时间,建议您使用样式代替。

然后,VS 将这一点发挥到极致,而不是使用内联样式,而是在 img 的默认样式表位置创建一个新样式,正如您所发现的。

但是,除非您在某处使用全尺寸图像,否则最好在将图像上传到服务器之前调整图像大小,以节省每个人的带宽。

另外,IE 的默认缩放例程做得很差,但您可以通过 css 打开立方采样。

Yes, basically the width and height properties of the HTML <img /> have been deprecated for some time, you are recommended to use styles instead.

VS then takes this to the extreme, and instead of using inline styles, will create a new style in the default style sheet location for img, as you've discovered.

However, unless you are using the image full size somewhere you are better off resizing the image before you upload it to the server, saving on everyones bandwidth.

Also, IE does pretty poor things with it's default scaling routine, but you can turn on cubic sampling through css.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文