Q & A helps you solve the basic questions in CSS webpage creation

Source: Internet
Author: User

Let's take a look at the CSS statements below, which are some of the problems I have encountered in the past. Can you guess? You 'd better first reply and talk about what you think is the correct answer! Then let's look at the effect! This is interesting! If you have all the right answers, come and have a cool!
1. Guess what the background color is?
Answer:
A: red
B: blue
Which one do you choose?

The code is as follows: Copy code
<Style> body {background: blue} </style>
</Head>
<Body bgcolor = "red">

Think about the background color?
</Body>
2. Guess what color the text is?
Answer:
A: red
B: blue
Which one do you choose?

The code is as follows: Copy code
<Style>
. Red {color: red}
Body {color: blue}
</Style>
</Head>
<Body class = "red">

Think about the color of text?
</Body>
3. Guess what color the text is?
Answer:
A: red
B: blue
Which one do you choose?

The code is as follows: Copy code
<Style>
. Red {color: red}
. Blue {color: blue}
</Style>
</Head>
<Body class = "blue red">

Think about the color of text?
</Body>
4. Guess what color the text is?
Answer:
A: red
B: blue
Which one do you choose?

The code is as follows: Copy code
<Style>
. Blue {color: blue}
. Red {color: red}
</Style>
</Head>
<Body class = "red blue">

Think about the color of text?
</Body>
5. What will happen to this black stripe?
Answer:
A: 200px is empty on the right;
B: full screen width;
Which one do you choose?

The code is as follows: Copy code
<Style>
# Webjx {width: 100%; margin-left: 200px; background: #000}
</Style>
<Body>
<Div id = "webjx"> What about this black bar? </Div>
</Body>

6. What will happen to this black stripe?
Answer:
A: 200px is empty on the left;
B: full screen width;
Which one do you choose?

The code is as follows: Copy code
<Style>
# Webjx {width: 100%; margin-right:-200px; background: #000}
</Style>
<Body>
<Div id = "webjx"> What about this black bar? </Div>
</Body>

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.