First, box models (box model)One box and 4 parts: Content,padding(fill),border(border), and margin(outer boundary)There are two types of box models:(1) standard box model(2) IE box model (content includes padding and border)In order to unify the standard, make the webpage compatible with each browser, must use the standard box model How to use? A: add DOCTYPE statement at the top of the pageSecond, the box model structure detailed1.
one.
Then introduce it in the CSS code.
@import url (' Https://fonts.googleapis.com/css?family=Passion+One ');
This time we are in our body in a random number of letters, such as Long shadow
Then we define some basic patterns of H1;
h1{ Text-align:center; Font-size:6rem; Padding-top:2rem;}
The next step is to achieve the core of the code that writes Text-shadow.
The value of the Text-shadow can have
CSS to make rounded corners tutorials with HTML code and all CSS code.
Another way to make rounded corners with CSS is to use no pictures.HTML code:
CSS code:
Ody{background-color: #000;}. curvedbox{width:300px;margin:2510px a
Source: http://www.ido321.com/1214.htmlThe first two days translated an article about using CSS border properties to make Basic graphics: http://www.ido321.com/1200.htmlOn this basis, today to share an article to everyone, if you make use of CSS bubble cue box.First look at 2 photos:Css:/*dialog Bubblesusage: Use the.
1. When you move the mouse up, there is a small box for saving and printing the favorite window. Can you limit it?
Add in Head
2. Use the new property galleryimg on the Image
3. Div implements the scroll bar (in some cases, IFRAME can be replaced)
The height and overflow must be set!
PS: in IE, the horizontal scroll bar sometimes appears, but in fact, the horizontal scroll bar does not have any practical purpose. It seems that this is an IE bug. Solution: overflow-X: hidden
Add this to hide t
Make use of css+ original JS to produce simple clocks. The effect looks like this
Achieve this effect, divided into three chunks: HTML, JavaScript, CSS
HTML sectionthe HTML part is simpler, defines a clock div, the interior has the origin, the time second hand, the date as well as times, as to the clock on the scale, the number and so on the element, because
requirements of the UI design, cut out the corresponding pictures, for example, we can easily according to the needs of the production of different heights and colors of the triangle. In terms of usage, HTML code and CSS code are relatively simple. As the following figure is an example:This direct use of the background image method is suitable for us in the triangle contains gradient, pattern, texture and other special effects, we can set its color t
Grammar: user-select: None | Text | (both of them are used)Default value : Textapplies to : all elements except the replacement elementValue:None: text cannot be selected Text : You can select textsDescriptionSets or retrieves whether the user is allowed to select text.
Ie6-9 does not support this property, but it supports the onselectstart="return false;" effect of using tag properties user-select:none ; Safari and Chrome also support this tag property;
Until Opera12.5 still doe
Css|yahoo
This article and the code by Renx original, copyright, casual use, which can be greatly seen in the next, useful to the words, I am honored you to tell me.BeginIn order to do this Yahoo search box, I divided three steps:1. To do the search category first button, click and other buttons will look different, this is quite simple
Of course, this is not enough, then realize the second step effect.
2. Add a search input box, and you can change t
Here first give the production style:
Here you want to change the style for each button in the click of the border, with each and click of the combination to achieve the best but, on the jquery code:
$ ("#filterMenu a"). each (function () { //this.id = i;//Set the ID of each a label as the ID
//i++; $ (this). Click (function () { NB Sp
Set the OnClick event for each a tab //alert (this.id); if ($ (this). Hasclass ("Switchcolor")) nbsp
$ (this)
1) complete a navigation bar firststyletype= "Text/css">. Nav-ul{List-style:None;}. Nav-ul Li{width:100px;Height:40px;Border:1px solid #000;float: Left;Margin-right:10px;text-align:Center;Line-height:40px;}style>Divclass= "NAV"> ulclass= "Nav-ul"> Li>Nav1Li> Li>Nav2Li> Li>Nav3Li> ul> Div>The effect is as follows:2) at the far right of each navigation to make a lower triangle, t
What are the advantages of using a background map to make a page in CSS ?Briefly introduce the advantages of CSS Sprites:When the user to the U disk to copy 200 pictures, will wait a long time. But if you make a file, copying it will be much faster.The goal of CSS Sprites is
This article has shared the pure js+html to make the accordion and the pure css+html to make the accordion two kinds of effects, for everybody reference, the concrete content is as follows
One, pure css+html accordion effect
This kind of accordion with CSS is relatively si
on the background forever, it will not be overwritten by the background */:;/* only the located element can use z-index */} {:;/* to locate and overlap with main */:; :;:;:;:;}
Then we use the script to control the bg width and height to make it consistent with the main width and height.
Js:
mainObj = document.getElementById('main' bgObj = document.getElementById('bg'= mainObj.clientWidth + "px"= mainObj.clientHeight + "px";
Below is:
IE and modern
Line feed of a common text section
Case study: in practical applications, we often encounter this problem, that is, a piece of text, with a clear width, requires text to wrap automatically. (For example)
Case study: The above two figures do not use any typographical CSS attributes, that is, by default, the text in the block element will automatically wrap when it reaches the edge. But here is a special case: the content is all English letters (no wor
In the Web page, usually the designers in order to highlight their product theme, will always let text or add special effects, such as to keep the text flashing, or regular discoloration. So as to achieve the purpose of attracting attention. So what are some of the other ways to achieve this feature, in addition to GIF animations made with PS? For those who understand the code, we all know that there are many kinds of CSS Chinese font styles, such as
Use Div and CSS to create triangle effects:This section describes how to use the div and CSS to achieve the triangle effect, although it looks like the table is magical, but the principle is very simple.The code is as follows:DOCTYPE HTML>HTML>Head>MetaCharSet= "Utf-8">Metaname= "Author"content= "http://www.softwhy.com/" />title>Ant Tribetitle>styletype= "Text/css
This article mainly introduces you about how to use CSS to do navigation bar related knowledge, I hope to have the necessary friends to help. For any web site, the presence of the navigation bar is critical, so if you just make a tedious navigation menu with HTML, the effect is definitely poor. The importance of CSS properties is then reflected.
Here is a concre
This time to bring you CSS to make a point effect, CSS to make a point of attention to the effect of what, the following is the actual case, together to see.
The code is as follows:
Believe that you have read the case of this article you have mastered the method, more exciting please pay attention to the PHP Chi
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.