Learning the html (11) CSS box model from scratch-css from scratchI. Element Classification
In CSS, tag elements in html are divided into three different types: block elements, inline elements (also called intra-row elements), and inline block elements.
Common block elements
1) htmlA. Definitions and usageIn HTML 4.01, HTML5 is not based on SGML, so you do not need to reference a DTD.B. Version declarationsHTML5:HTML 4.01: "Http://www.w3.org/TR/html4/loose.dtd" >The DTD contains all the HTML elements and attributes, including both display and deprecated elements (such as font). Frameset (framesets) is not allowed.Rules of attention:
correspondence.A). Using CSS formatting list characters: UL li{List-style-type:none;}B). If you want to replace the list symbol with an image, then: UL li{List-style-type:none;List-style-image:url (images/icon.gif);}C). To align Left, you can use the following code: ul{List-style-type:none;margin:0px;}D). If you want to add a background color to the list, you can use the following code: ul{List-style-type:none;margin:0px;}UL li{Background: #CCC;}E).
Website Html,xhtml,xml,wml,css and other language test verification tool introduction1 Online website language test check site:HTML and XHTML Test Checker Web site: http://validator.w3.org/or http://www.htmlhelp.com/tools/validator/CSS Test Checker website: http://jigsaw.w3.org/css-validator/RSS Feed Test Check site: h
All HTML elements are selectors (all HTML elements are HTML)
The previous course defines the elements of
For example, set the background color for the entire body below
Body {
background-color: #C6E2FF;
}
Multiple selectors (multiple selectors)
You can nest an HTML element inside another, for example,
In the example below you will find a wide variety of clips, HTML displays, login methods, vertical menus, and even the most popular themes of the moment: flat design (flattened image, flattened button shape, flattened user interface elements, etc.). Take a good look at these snippets of code, and if you incorporate them into your design, it will save you a lot of time, or you can think about learning something new from someone else and save it for a r
JSBinThe editor is characterized by the ability to write directly HTML, CSS, JavaScript, and can be observed in real-time in the output of the writing effect, you can set the Autorun javasscript code, the biggest benefit is that there is a console debug box.
JsfiddleThe editor is characterized by the ability to write HTML,
We all know that the loading of the webpage takes a certain amount of time,Even as we strive to optimize the efficiency of code execution and compress files,But it still takes time, and if nothing happens on the surface during this period,The user will have a worse experience,But if there is an animation or a progress bar,That's totally different.This article shares the pure css+html loading animation codeT
Article Introduction: Open source Javascript/html/css run and debug-Editr.
Date: 2013-5-6 Source: gbin1.com
Everyone must be familiar with the Gbdebug,jsfiddle and Jsbin and other online debugging and running services, here today we introduce an open source online running service, you can easily integrate into your own website.
Main Features
Relies on jquery and Ace Eidtor
Configure
JQuery-Get contenttext (), HTML (), and Val ()and Propertiesattr ()A very important part of JQuery is the ability to manipulate the DOM.DOM = Document Object modelThree jQuery methods for DOM manipulation ( get content ):Text () -Sets or returns the text content of the selected elementHTML () -Sets or returns the contents of the selected element (including HTML tags)Val () -Sets or returns the (value) of a
The html background color gradient we see is implemented through CSS. I personally feel pretty good and can clearly see the image effect:
Implementation Code:
The Code is as follows:
width of the double line equals the value of border-width. Groove defines a 3D groove border. The effect depends on the value of the Border-color. Ridge defines a 3D ridge-shaped border. The effect depends on the value of the Border-color. Inset defines a 3D inset border. The effect depends on the value of the Border-color. Outset defines a 3D outset border. The effect depends on the value of the Border-color. Inherit specifies that the border style should be inherited from the parent element.
To add CSS styles directly to html, you need to add the start and end style tags to the
To write a rule for multiple elements, simply add a comma between selectors, such as "h1,h2".H1,H2 { font-famliy:sans-serif; Color: gray; }
Underline: with border-bottom:1px solid black extension, This line extends to the edge of the page. when using text-decoration:underlin
First, CSS title hidden1, 2. 3, 4, 5. CSS Positioning Position property locates the position of the element6, relative positioning relative to the position of the normal position of the element7. Absolute locates the position relative to its nearest parent element, if no element is relative to the HTML8. Positioning of overlapping elementsElements are positioned independently of the document flow, so you c
(absolute fixed) 1.4.2 Fixed positioning does not change position as the mouse scrolls. He really is a fixed screen of a certain location, the more common is the bottom right corner of the page adsThe location origin of absolute positioning (absolute) is the parent node of the non-default positioning (static). Can be absolute fixed relative, if the parent node does not have these, the positioning origin is the body. Using one of these two positions, the layout space that the element originally
HTML Hyper Text Markup LanguageThe code we write is rendered by the browser and generated by the Web page.World Wide Web Consortium is currently the most authoritative and influential technology standards organization in the field.So far, the website has published more than 200 far-reaching web technology standards and implementation guidelines.Hyper Text hypertext: Not only include text, but also include pictures, links, music videos and more.Markup
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.