前端技术经验总结

发布时间:2020-12-19作者:冰貂主人点击:84

1,form表单验证(Validform) 
<input type="text" name="name" placeholder="请输入用户名/注册手机号码"  autocomplete="off"  datatype="*"  errormsg="请输入用户名" tipsrmsg="请输入用户名">
validform5.3.2版本

2,layui 手机电脑端两用  开源代码 https://gitee.com/Yuege909/lemocms/tree/master/

3,$("#listform").serialize();分隔用逗号
strs="a=1&b=2&c=3";
function dealStr(strs) {
  var strArr = strs.split("&")
  var str = ""
  for (const item of strArr) {
    str += item.split("=")[1] + ","
  }
  return str.slice(0, -1)
}
新知识: display:table-cell;display:flex;display:table;
1,手机页面点击a标签跳转到拔打电话页面  <a href="tel:{dede:global.cfg_sj/}" title="手机"></a>
      手机页面点击a标签跳转到发送短信页面  <a href="sms:{dede:global.cfg_sj/}" title="短信"></a>

2,个人使用场景:http://wpa.qq.com/msgrd?v=3&uin=995349001&site=qq&menu=yes
企业QQ在线咨询:http://b.qq.com/webc.htm?new=0&sid=800015546&o=www.cndns.com&q=7

3,hr这条线改变颜色、高度<hr style="background: #2A2F3C;  border: none; height: 1px; ">

4,div里面的图片和文字居中。

    <div style="height:100px;line-height:120px;">
       <img src="">天涯若比邻
     </div>

5,人民币符号  输入法是中文状态下,shift+4或者html中用&yen;  

6,ul里面的li浮动后居中显示,导航中使用。ul{display:flex;junstify-content:center;} 。设为Flex布局以后,子元素的floatclearvertical-align属性将失效。
7,背景图的两种方式:(1)div{background:url(ab.jpg) no-repeat;}。(2).contact-content{
    position: relative;
}
.contact-content > img {
    position: absolute;
    left: 0px;
    top: 0px;
    z-index: -1;
}

8,border-bottom和box-shadow可以重叠。两条线重叠。



9,

当锚点遇到fixed定位

padding-top:100px;
margin-top:-100px;

10

标签: