H5悬浮返回按钮,转载自:https://blog.csdn.net/qq_26817251/article/details/53648685
<div id="dg" onclick="history.back()" style="z-index: 9999; position: fixed ! important; right: 20px; top: 700px;">
<div width="100%" style="position: absolute; right: 0px; top: 0px;">
<img src="images/back.png" >
</div>
</div>
H5必填项设置,转载自:https://www.cnblogs.com/hoasou/p/5431389.html
input 里面增加这样的语句:
<input type="text" placeholder="您的姓名" required oninvalid="setCustomValidity('请输入您的姓名');" oninput="setCustomValidity('');" />
WEB前端开发人员须知的常见浏览器兼容问题及解决技巧,转载自:https://blog.csdn.net/xustart7720/article/details/73604651?utm_source=blogxgwz0
MUI 分享功能(微信、QQ 、朋友圈)
http://www.5imoban.net/jiaocheng/hbuilder/2018/0130/3182.html
移动端使用百度分享代码
http://share.baidu.com/code/advance#config
获取容器宽度并设置字体大小
var hdWidth = document.body.getBoundingClientRect().width;
// 获取容器宽度
for(i=0;i<28;i++){
if(hdWidth<250){
document.getElementsByClassName('hd-text')[i].style.fontSize = "10px";
}else if(hdWidth<265){
document.getElementsByClassName('hd-text')[i].style.fontSize = "11px";
}else if(hdWidth<305){
document.getElementsByClassName('hd-text')[i].style.fontSize = "13px";
}else if(hdWidth<325){
document.getElementsByClassName('hd-text')[i].style.fontSize = "14px";
}else if(hdWidth<355){
document.getElementsByClassName('hd-text')[i].style.fontSize = "15px";
}else{
document.getElementsByClassName('hd-text')[i].style.fontSize = "16px";
}
}