dedecms织梦手机站内容页图片自适应标签
发布时间:06/26 来源:未知 浏览:
关键词:
- <style>.con img{width: 100% !important; height:auto !important;}</style>
- <div class="con">
- <p>{dede:field name='body'/}</p>
- </div>
- //设置全局环境变量
- $this->Fields['typename'] = $this->TypeLink->TypeInfos['typename'];
- @SetSysEnv($this->Fields['typeid'],$this->Fields['typename'],$this->Fields['id'],$this->Fields['title'],'archives');
- //去除img的width和height
- $this->Fields['body'] = preg_replace("/style=\"width\:(.*)\"/","",$this->Fields['body']);