记住用户名密码
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <style> html,body{ height:100%; width:100%; padding:0; margin:0; } #content{ width:90%; height:100%; padding:0; margin:10px auto; } </style> </head> <body> #CONTENT </body> <script> var imgs = document.getElementsByTagName('img'); for(var i in imgs) { var img = imgs[i]; img.style.width='100%'; img.style.height='auto'; } </script> </html>
<script> var imgs = document.getElementsByTagName('img'); for(var i in imgs) { var img = imgs[i]; img.style.width='100%'; img.style.height='auto'; } </script>
方案二:修改百度编辑器默认样式,找到image.js,注释或修改默认样式style: "width:" + data['width'] + "px;height:" + data['height'] + "px;"
getInsertList: function () { var data = this.getData(); if(data['url']) { return [{ src: data['url'], _src: data['url'], width: data['width'] || '', height: data['height'] || '', border: data['border'] || '', floatStyle: data['align'] || '', vspace: data['vhSpace'] || '', title: data['title'] || '', alt: data['title'] || '' //style: "width:" + data['width'] + "px;height:" + data['height'] + "px;" }];
目前有 0 条留言 其中:访客:0 条, 博主:0 条