hangyangws / basecss Goto Github PK
View Code? Open in Web Editor NEWCSS基类,减少浏览器差异,常用CSS类名
License: MIT License
CSS基类,减少浏览器差异,常用CSS类名
License: MIT License
select/input/textarea默认的box-sizing不一样,在baseCss中统一处理了更好
提点建议,太多冗余标签了。举个例子:
诸如 div 、dt、li 、th、td 等标签在和任何浏览器下都是没有默认 padding 和 margin 的。
那给它都添加上一个全局标签如下是没有意义的。
{
margin: 0;
padding: 0;
}
我们都知道在脚本语言中不要滥用全局变量,避免污染全局环境,却很容易在 CSS 中忽略这一点。
尽量简化你的base.css,只留下必要的,然后根据业务需求修改。
以下面这个为例,
img,
abbr,
input,
button,
acronym,
fieldset,
textarea {
border: none;
}
譬如 abbr
、acronym
、fieldset
可能大部分人甚至都不清楚它的语义,代码中几十个项目都不会出现一次,却被初始化了这么多次,是完全没有必要的。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.