css+div--front-end ER Essential Foundation

Source: Internet
Author: User

  

b/S is really a long insight stage, know a lot of front-end necessary language, with the increase in time, I thought the news release system learned that I do not know what is the thing, will long ago the impression. But it is even more profound, then did not know what is CSS, learned to write CSS. Not what is asynchronous communication, you learned to use Ajax. When we see the classic frame in the video, we find that this is not the css+div used in the press release system! (⊙o⊙) Oh, I would have written it already!


First, why is Div+css


Seeing this pairing, I was wondering why it was such a combination? span is not allowed! You can't use HTML directly! A clear purpose: in order to separate the data content from the data format, the front-end ER development and maintenance is convenient. Imagine a statement in a chain style sheet

<span style= "FONT-FAMILY:KAITI_GB2312;FONT-SIZE:18PX;" ><link href= "(CSS style sheet)" rel= "stylesheet" type= "Text/css"/></span>

If you need to modify the style of any one of the front-end elements, simply find the ID or category name in the style sheet, which will undoubtedly greatly improve the efficiency of the development.


One more question is why is span not possible? The difference between span and Div is that Div (division) is a block-level element that can contain paragraphs, headings, tables, and even chapters, summaries, and notes. While span is an inline element, span is not wrapped, it has no structural meaning, it is purely applied, and spans can be used when other inline elements are not appropriate.



two or one step -by-step implementation of DIV+CSS


Step one:div sub-block


First of all, consider that the Web page is divided into several display parts, banner and footer are necessary, other content display is the problem of personality, assigned to the corresponding Div block.





Step two:div Positioning--Box model


Using a CSS style sheet to position the Div, we need to use our box model, such as its name, the box is used to store things, can be arbitrarily moved. Of course a more professional word, we call it floating. Here is the display of the box model, margin, border, padding. It would be nice if you could think of the picture on the wall of the photo studio.










Step Three: Overall architecture


The following code is the first prototype of the interpretation, is a very basic CSS+DIV implementation results. The use of the box floating effect, so that the content module and the link module respectively to the left and right side of the floating.






As follows:





Third, summary


With the combination of CSS and Div, the loading of the Web page becomes easier because the separation of data from the format makes maintenance easier. The efficiency of search and the improvement of browsing efficiency will bring a good user experience. So ... Css+div is composed of such a concise source code foreground, we learn the front-end development of the necessary foundation.





css+div--front-end ER Essential Foundation

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.