删除属性“height”和“宽度”的图像标签 [英] Remove attributes "height" and "width" of the image tag

查看:338
本文介绍了删除属性“height”和“宽度”的图像标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了使用 Typo3 Twitter Bootstrap ,我要删除图片的高度宽度属性

In order to create a responsive website with Typo3 and Twitter Bootstrap, I would like to remove the height and width attributs of images

这里是如何在前端通过文本和类型的内容元素生成图像。

Here's how images are generated in Frontend via content element of type text & image and image

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

我想删除维度属性并获取:

I would like to remove the dimension attributes and get this:

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

任何人都可以帮助我?

推荐答案

不能使用typoscript删除height或width图片属性。

It's not possible to remove the height or width image attributes with typoscript.

但是您可以使用CSS覆盖它,响应网站。

But you could override it with CSS in order to create a responsive website.

img {
height:100%!important;
width:100%!important;
}

这篇关于删除属性“height”和“宽度”的图像标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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