本文主要包含html,css等相关知识,佚名 希望在学习及工作中可以帮助到您
我将利用三天的时间来完成制作京东首页的静态页面效果,其中包含的内容有html以及css。
1、在开发进行之前,首先要配置开发环境:我们需要安装sublime webstorm vscode Hbuilder atom等开发软件,选择其一即可。我所使用的是webstorm。
2、在主文件夹中建立相关的项目文件夹 :为了将与项目相关的文件放在一块,便于管理和以后的维护。
其中:包括与项目相关的一些文件
主页或是首页 index.html default.html
Css文件夹 css文件的
Base.css global.css
Images文件夹 用来放置网站中的所有的图片
Js文件
音频或是视频文件
3、在这之后我们要进行样式初始化,一般所有网站开发之前都会进行样式初始化,例如淘宝、京东这样的大网站,都有自己的样式初始化css文件。如:
- html, body, ul, li, ol, dl, dd, dt, p, h1, h2, h3, h4, h5, h6, form, fieldset, legend, img {
- margin: 0;
- padding: 0;
- }
- fieldset, img, input, button {
- border: none;
- padding: 0;
- margin: 0;
- outline-style: none;
- }
- ul, ol {
- list-style: none;
- }
- /*去掉原样式中的小黑点*/
- input {
- padding-top: 0;
- padding-bottom: 0;
- font-family: "SimSun", "宋体";
- }
- select, input {
- vertical-align: middle;
- }
- /*输入字居中显示*/
- select, input, textarea {
- font-size: 12px;
- margin: 0;
- }
- /**/
- textarea {
- resize: none;
- }
- /*防止拖动*/
- img {
- border: 0;
- vertical-align: middle; /* 去掉图片底部默认的3像素空白缝隙*/
- }
- table {
- border-collapse: collapse; /*合并外连线*/
- }
- body {
- font: 12px/150% Arial, Verdana, "\5b8b\4f53"; /*unitedCode的写法,宋体的写法*/
- color: #666; /*150%基于当前字体尺寸的百分比行间距*/
- background: #fff;
- }
- .clearfix:before, .clearfix:after {
- /*清除浮动,最好最标准的写法*/
- content: "";
- display: table;
- }
- .clearfix:after {
- clear: both;
- }
- .clearfix {
- *zoom: 1; /*IE/7/6*/ /*兼容IE6下的写法*/
- }
- a {
- color: #666;
- text-decoration: none;
- }
- a:hover {
- color: #C81623;
- }
- h1, h2, h3, h4, h5, h6 {
- text-decoration: none;
- font-weight: normal;
- font-size: 100%;
- }
- s, i, em {
- font-style: normal;
- text-decoration: none;
- }
- .col-red {
- color: #C81623 !important;/*京东主色调*/
- }
- /*公共类*/