1.去掉谷歌浏览器input记住账号或密码时默认出现的黄色背景
直接用css的内阴影来覆盖黄色
input:-webkit-autofill {
-webkit-box-shadow: 0 0 0px 1000px white inset;
}
2.table表格固定列宽
table{
table-layout:fixed;
}
3.文字截断在火狐浏览器不生效
word-break: break-all;
在火狐浏览器不生效,原因是加在了span(行内元素)标签上不生效,加在div(块级元素)标签上就生效了。
4.strong标签和b标签
strong标签表示加粗强调,b标签表示黑体,已被HTML4废弃,HTML5救回来表示关键字。
5.去掉谷歌浏览器记住密码
新版本谷歌浏览器记住密码,不光记住登录页面的密码,进去注册页面,发现密码框也自动填充,而且加autocomplete = "off"不管用。
解决方案:给密码框input加上autocomplete = "new-password"即可解决
<input type="password" autocomplete = "new-password">