CSS web page layout introductory tutorial 1: Fixed width of one column_Basic tutorial

WBOY
Release: 2016-05-16 12:07:23
Original
1386 people have browsed it

本系列教程为入门级教程,适合初学者学习,由最简单的知识一点一点进阶。主要以实例为主,很少部分理论,这样更适应初学者快速掌握。因本人也正在学习,难免有一些错误或疏漏地方,望各位给予指正。本教程参考《CSS网站布局实录》一书,在此向作者表示感谢。
要想学好DIV+CSS,首先要有一定的HTML和CSS知识,如果这些你还不了解,建议你先去补习这一课,再来学习本教程。另外还要抛弃传统表格布局的思维模式,至于为什么,在你学习本教程中慢慢就会体会到。如果这些你都准备好了,那么开始吧!

一列固定宽度
一列固定宽度是基础中的基础,所以这节做为入门的第一节。
我们给div使用了layout作为id名称,为了便于查看,使用了background-color: #E8F5FE;将div的背景色设置成浅蓝色,用border: 2px solid #A9C9E2;将边框设置成天蓝色。背景色和边框的属性将会在以后的教程中讲解。
由于是固定宽度布局,因此我们直接设置了宽度属性width: 300px;与高度属性height: 200px;最终效果请点击“运行此代码”按钮查看。

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!