Div + CSS (2): webpage Banner Design

Source: Internet
Author: User

On the Concept of Div + CSS another blog has been written a lot: http://blog.csdn.net/cjl5678/article/details/7606229

Next, I knocked on a small demo to enhance my understanding of Div + CSS and understand the usage skills in this area. The instance is mainly used to set the banner of the website.

The code above HTML:

<Head> <meta http-equiv = "Content-Type" content = "text/html; charset = gb2312 "/> <title> Banner Design </title> <% -- add CSS reference -- %> <link href = ".. /banner/banner.css "rel =" stylesheet "type =" text/CSS "/> 

CSS code:

Body {/* Background setting */background-image: url(backgroundimage.jpg);} # Banner {/* overall banner Layout */Text-align: center; position: absolute; /* set the webpage center */width: 700px; margin-left:-350px; left: 50%;} ul {list-style: none; margin-top: 2px; margin-left:-41px;} li {/* clear List format */list-style: none; margin: 1px; float: Left ;} A {/* tag button style setting * // * remove original format */Text-Decoration: none;/* set button new style */padding: 3px; Background-image: url(button.jpg); background-repeat: Repeat-X; color: # ffffff;} A: hover {/* hover the mouse event to achieve the button effect */Text-Decoration: none; background-image: none; Background-color: # 0099ff; color: #000000 ;}

:

Main tips used in the instance:

(1) Implement the button Effect

(2) Use of nested IDS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.