本篇文章给大家分享的是有关怎么在CSS中使用Reset重置样式,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。html{  
本篇文章给大家分享的是有关怎么在CSS中使用Reset重置样式,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。
html{ font-size:14px; box-sizing: border-box; }html,body{ -WEBkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-overflow-scrolling: touch; overflow-scrolling: touch; height: 100%;}body{ background: #fff; font:14px,-apple-system,BlinkMacSystemFont,'SeGoe UI','PingFang SC','Hiragino Sans GB','Microsoft YaHei', 'Helvetica Neue',Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol' -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;}
去除浏览器默认的margin和padding, 自行删减一些不必要的标签
body,p,h2,h3,h4,h5,h6,h7,dl,dd,ul,ol,th,td,button,figure,input,textarea,fORM,pre,blockquote,figure{margin: 0;padding: 0;}a{ cursor: pointer; text-decoration:none; transition: color 0.3s ease;}ol,ul{ list-style:none }
这些节点部分属性没有继承父节点样式,所有继承一下,并取消outline,外轮廓的效果
a,h2,h3,h4,h5,h6,h7,input,select,button,textarea {font-family: inherit;font-size: inherit;font-weight: inherit;font-style: inherit;line-height: inherit;color: inherit;outline: none;}button,input[type='submit'],input[type='button'] { cursor: pointer;} input[type='number'] {-moz-appearance: textfield;}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button {margin: 0;-webkit-appearance: none;}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner { border-style: none; padding: 0;}[hidden] { display: none;}template { display: none;}
以上就是怎么在CSS中使用Reset重置样式,小编相信有部分知识点可能是我们日常工作会见到或用到的。希望你能通过这篇文章学到更多知识。更多详情敬请关注编程网精选频道。
--结束END--
本文标题: 怎么在CSS中使用Reset重置样式
本文链接: https://www.lsjlt.com/news/252127.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-05-08
2024-05-08
2024-05-08
2024-05-08
2024-05-08
2024-05-08
2024-05-08
2024-05-08
2024-05-08
2024-05-08
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0