Front-end pen question set

Source: Internet
Author: User

No.1

The width of the green area is 100%, with three rectangles. The width of the first rectangle is PX, and the width of the second and third rectangles is equal. Use the functions in css3 to implement their layout.

 

The known HTML structure is:

<div class="box"><div class="item">column 1</div><div class="item">column 2</div><div class="item">column 3</div></div>

Answer:

. Box {width: 100%; Background: green; display:-moz-box;/* Firefox */display:-WebKit-box;/* safari and chrome */display: box; -WebKit-box-Orient: horizontal ;}. item {-moz-box-Flex: 1;/* safari and chrome */-WebKit-box-Flex: 1;/* safari and chrome */box-Flex: 1; /* safari and chrome */height: 60px; Background: red; margin: 10px 0 ;}. item: First-child {Background: red; width: 200px;-WebKit-box-Flex: 0;/* safari and chrome */margin: 10px ;}. item: Last-child {Background: red; margin: 10px ;}

No. 2

Use the HTML5 standard to complete the following page layout (the HTML code of the entire page must be fully written, and CSS is not required)

 

Answer:

<! Doctype HTML> View code

 

Front-end pen question set

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.