gpt4 book ai didi

html - 移除图片标签的属性 "height"和 "width"

转载 作者:太空狗 更新时间:2023-10-29 13:18:05 24 4
gpt4 key购买 nike

为了使用 Typo3 创建响应式网站和 Twitter Bootstrap ,我想删除图像的高度宽度属性

以下是如何通过 text & imageimage 类型的内容元素在前端生成图像

<img src="typo3temp/pics/a625b79f89.jpg" width="300" height="226" alt="blabla" />

我想删除维度属性并得到这个:

<img src="typo3temp/pics/a625b79f89.jpg" alt="blaba" />

谁能帮帮我?

最佳答案

在 document.ready 函数中调用图像标签。

$('img').removeAttr('width').removeAttr('height');

关于html - 移除图片标签的属性 "height"和 "width",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11014165/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com