今天完成的事情:
样式重置
根据 关于CSS Reset 那些事 这篇文章了解到样式重置的事情,并且对文件做了改动,保留了可能用到的样式。第一次使用还有不完善的地方,后续再改进。
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
html {
font-family: sans-serif;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
body {
margin: 0;
}
footer,
header,
main,
nav,
section {
display: block;
}
audio {
display: inline-block;
vertical-align: baseline;
}
audio:not([controls]) {
display: none;
height: 0;
}
a {
background-color: transparent;
}
a:active,
a:hover {
outline: 0;
}
b,
strong {
font-weight: bold;
}
dfn {
font-style: italic;
}
h1 {
font-size: 2em;
margin: 0.67em 0;
}
img {
border: 0;
}
button,
input,
optgroup,
select,
textarea {
color: inherit;
font: inherit;
margin: 0;
}
button {
overflow: visible;
}
button,
select {
text-transform: none;
}
button,
html input[type="button"],
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button;
cursor: pointer;
}
button[disabled],
html input[disabled] {
cursor: default;
}
input {
line-height: normal;
}
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box;
padding: 0;
}
设置可能用到的less变量,主要是颜色等和自己对mixin的一些想法
// variable
// color
@bg-blue: rgb(41,189,224);
@bg-darkblue: rgb(105,209,233);
@bg-grey: rgb(240,240,240);
@bg-white: rgb(255,255,255);
@bg-yellow: rgb(251,180,53);
@bg-ligthyellow: rgb(253,215,147);
//font-color
@font-grey: rgb(154,154,154);
@font-white: rgb(255,255,255);
@font-yellow: rgb(251,180,53);
@font-black: rgb(120,120,120);
@img-url: "../img";
// mixins
.z-index(@z-index) {z-index: @z-index;}
.clr(@color) {color: @color;}
.bgc(@color) {background-color: @color;}
.bg(@img, @wdth-pstion:center, @hgt-pstion:center,@wdth, @hgt ) {
background: url("@{img-url}/@img") no-repeat @wdth-pstion @hgt-pstion;
background-size: @wdth @hgt;
}
.fixed() {
position: fixed;
}
.mixin(@-) {.fixed();}
.mixin(top) {
top: 0;
left: 0;
}
.mixin(bottom) {
bottom: 0;
left: 0;
}
.clearfix() {
&:before,
&:after {
content: " "; // 1
display: table; // 2
}
&:after {
clear: both;
}
}
明天计划的事情:
完成页面1
遇到的问题:
任务要求:阅读样式表组织规范,拆分样式表;看了一些文章之后仍然一头雾水
这个应该是一种编码实战,根据自己的经验做出现阶段最合理的方案。现在只能先根据任务步骤要求强制自己做出一些改变。
收获:
样式重置是一个避免不了的过程,浏览器对于标签的实现不同,这样不同浏览器的最终表现就存在差异。为了不同浏览器表现的统一,对样式进行重置,同时消除浏览器本身设置存在的问题。
样式表拆分好像是对于团队协作来说的分工要求,形成一些公共功能,同时避免css全局性出现的一些错误。
任务13
开始时间:5.17
预计结束时间:5.21
http://task.jnshu.com/zentao/project-task-629.html
评论