The question and answer method helps you to solve the basic problem of CSS Web page making

Source: Internet
Author: User
Tags modify
css| Solutions | web | issues

Look at the bottom of these CSS writing, I have seen in the past some of the problems, see you can guess right? You'd better reply first and say what you think is the right answer!  And then see what the effect is! That's funny! All right, come to the Chiao Tung Jiaotong rats, please drink cola!

1. Guess what color is the background?

Answer:
A:red
B:blue

Which one do you choose?

<style>body{background:blue}</style>
<body bgcolor= "Red" >
Think about what color the background is?
</body>

2, guess what color is the text?

Answer:
A:red
B:blue

Which one do you choose?

<style>
. red{color:red}
body{Color:blue}
</style>
<body class= "Red" >
Think about what color the text is?
</body>

3, guess what color is the text?

Answer:
A:red
B:blue
Which one do you choose?

<style>
. red{color:red}
. blue{Color:blue}
</style>
<body class= "Blue Red" >
Think about what color the text is?
</body>

4, guess what color is the text?

Answer:
A:red
B:blue
Which one do you choose?

<style>
. blue{Color:blue}
. red{color:red}
</style>
<body class= "Red Blue" >
Think about what color the text is?
</body>

5. What will the black bar be like?

Answer:
A: the right space 200px;
B: Full screen width;
Which one do you choose?

<style>
#webjx {width:100%; margin-left:200px background: #000}
</style>
<body>
<div id= "WEBJX" > What about this black bar? </div>
</body>

6. What will the black bar be like?

Answer:
A: Left empty 200px;
B: Full screen width;
Which one do you choose?

<style>
#webjx {width:100%; margin-right:-200px background: #000}
</style>
<body>
<div id= "WEBJX" > What about this black bar? </div>
</body>

If you think there is no problem, then look at the effect of it! Suggest you first reply to your answer again see effect! :)
The effect is as follows:

1

<style>body{background:blue}</style></pead><body bgcolor= "Red" > Think about what color is the background? </body>

[Ctrl + A ALL SELECT hint: You can modify some of the code, and then run]

2

<style>.red{color:red}body{color:blue}</style></pead><body class= "Red" > Think about what color is the text? </body>

[Ctrl + A ALL SELECT hint: You can modify some of the code, and then run]

3

<style>.red{color:red}.blue{color:blue}</style></pead><body class= "Blue Red" > Think about what color is the text? </body>

[Ctrl + A ALL SELECT hint: You can modify some of the code, and then run]

4

<style>.blue{color:blue}.red{color:red}</style></pead><body class= "Red Blue" > Think about what color is the text? </body>

[Ctrl + A ALL SELECT hint: You can modify some of the code, and then run]

5

<style> #webjx {width:100%; margin-left:200px background: #000}</style><body><div id= "WEBJX" > What about this black bar? </div></body>

[Ctrl + A ALL SELECT hint: You can modify some of the code, and then run]

6

<style> #webjx {width:100%; margin-right:-200px background: #000}</style><body><div id= "WEBJX" > What about this black bar? </div></body>

[Ctrl + A ALL SELECT hint: You can modify some of the code, and then run]



Related Article

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.