是否可以在base64中设置gif图像作为响应?

时间:2015-05-04 18:55:33

标签: image responsive-design gif

我有下一个代码:

<!doctype html>
<head>
    <head>
    <meta charset="utf-8">
    <title>Goerman</title>
    </head>
    <body>
    <center>
        <div id="image">
            <img alt="Embebed Image" src="data:image/gif; base64,R0lG--IMAGE IN BASE64--="/>        
        </div>
    </center>
    </body>
</head>

我需要自动设置动画图像以屏蔽设备或导航器的大小。

1 个答案:

答案 0 :(得分:0)

Add the following class to your style sheet and the corresponding class to your img tag

<style>
  .responsiveImage {max-width: 100%; width: auto; height: auto;}
</style>


<img src="data:image/gif; base64,R0lG--IMAGE IN BASE64--=" class="responsiveImage" />