CSS examples
CSS Example
CSS Background
Set the background color of the page
Set the background color of different elements
Set an image as the background of the page
How to repeat the background image in the horizontal direction
How to position the background image
A fixed background image (this image will not scrolls with the rest of the page)
Set all background properties in one statement
Explanation of background properties
CSS text
Set the text color of different elements
Specifies the amount of space between characters Space
Specifies the space between lines
Set the text direction of the element
Disable text wrapping within an element
Vertical alignment of images within text
Explanation of the Text property
CSS font
Set font size using percentage and em
Set all font properties in one statement
CSS link
is a visited/unvisited link Add different colors
Specify the background color of the link
Add other styles for hyperlinks
CSS List
All the different list item tags in a list
Setting an image as a list item tag
Setting an image as a list item tag using a cross-browser solution
Set all lists in one statement Attribute
css Remove list item li Default style
Explanation of list attributes
CSS table
Specifies the th, td element of a table , add a black border
Specify the width and height of the table
Set the content Horizontal alignment (text alignment)
Set the vertical alignment of the content (vertical alignment)
Specify the padding of TH and TD elements
Specify the color of the table border
Set the position of the table title
Create a peculiar table
Explanation of table attributes
CSS Box Model
Specify the total width of the element to be 250 pixels
Use the Crossbrowser solution to specify the total width of the element to be 250 pixels
CSS border
Setting four The width of each border
Set the width of the upper border
Set the width of the bottom border
Set the width of the left border
Set the width of the right border
Set the styles of the four borders
Set the style of the upper border
Set the style of the lower border
Set the left border Style
Set the style of the right border
Set the color of the four borders
Set the color of the upper border
Set the color of the lower border
Set the color of the left border
Set the color of the right border
All borders in one statement Properties
Set different borders on each side
All top borders in one statement Property
All under one statement Border properties
All left border properties in one declaration
All right border properties in one declaration
Explanation of border properties
CSS outline
Draw a line around an element (outline)
Set the style of the outline
Set the outline color
Set the width of the outline
##Explanation of outline attributes
CSS marginSpecify the margin of an elementMargin abbreviation attributeThe value set for the top margin of the text is in centimetersUse The percentage value sets the bottom edge of the textThe centimeter value sets the left margin of the textExplanation of the Margin property
CSS padding
Set the left padding of the element
Set the right part of the element Padding
Set the top padding of an element
Set the bottom padding of an element
All padding properties in one declaration
Explanation of the padding attribute
CSS grouping and nesting
Group selector
Nested selector
Grouping and Nesting Explained
CSS Dimensions
Set the size of an image using pixel values Height
Use percentage to set the height of the image
Use pixel value to set the width of the element
Use percentage to set the width of the element
Set the maximum of the element Height
Use pixel value to set the maximum width of the element
Use percentage to set the maximum width of the element
Set the minimum height of the element
Use pixel value to Set the minimum width of an element
Use percentages to set the minimum width of an element
Explanation of the size attribute
CSS display
How to hide an element (visibility:hidden)
How not to display an element (display:none)
How to display the content of an element Linked elements
How to display block elements of an element
HHow to use the collapse attribute of a table
##Display Explanation of properties
CSS positioningThe position of the element relative to the browser windowThe relative positioning of the elementThe absolute positioning of the element Overlapping elementsSet the shape of the elementHow to use scroll bars to display overflow content within the elementHow to set up the browser's automatic overflow processingUse pixel values to set the top of the imageUse pixel values to set the bottom of the imageUse pixel values to set the left side of the imageUse pixel values to set the bottom of the image RightChange the cursorExplanation of positioning properties
CSS FloatSimply use the float attributeAdd borders and margins to the image and float it to the left of the paragraphThe title and image float to the rightLet the paragraph The first letter floats to the left Use the float property to create a picture gallery Turn on the float - clear property Create a horizontal menu Create A webpage without tablesExplanation of Float attribute
CSS alignment element
Use the middle adjustment of margin
Left/right position alignment
Use Crossbrowser solution, set left/right position alignment
Left/right alignment, float
Use Crossbrowser solution, set left/right position alignment, float
Alignment attribute explanation
CSS generated content
Use the URL in brackets The content attribute is inserted after each link
The chapter and subsection numbers are "Section 1", "1.1", "1.2", etc.
quotes attribute specifies quotation marks
CSS pseudo-class
Add different colors of hyperlinks
Add other styles to hyperlinks
Use: focus
:first-child - match The first p element
:first-child - Matches the I element in the first p element
:first-child - Matches all I elements in the first p element Element
Use: lang
Explanation of pseudo-elements
CSS navigation barFull style of vertical navigation barFull style of horizontal navigation barCSS attribute selector
Select elements with title attributes
Select title = one Elements with a specific value
Select title = an element with a specific value (use (~) to separate attributes and values)
Select title = an element with a specific value (use (|) to separate attributes and values) Value)
Attribute Selector Explanation
CSS Attribute Selector
CSS Loading Progress Bar
CSS paging style
CSS progress bar
CSS prompt information example
CSS text overlay image hover effect
CSS text overlay image hover effect - from top to bottom
CSS text overlay image hover effect – from bottom to top
CSS text overlay image hover effect – from right to left
CSS text Overlay Image Hover Effect – Left to Right
CSS Text Overlay Image Hover Effect – Fade to Transparent
CSS Vertical Button Group
CSS button group
CSS Loading animation effect
CSS Loading animation Effect 2
CSS Loading(Loading) Animation Effect 3
CSS Loading(Loading) Animation Effect 4
CSS Dynamic Search Box
CSS User Information Card
CSS Card Style
CSS previous page, next page styles
CSS various prompt information boxes
CSS three price list styles
CSS switch style
CSS makes the DIV appear horizontally centered
CSS four direction arrows up, down, left and right
CSS feedback information form
CSS font-awesome icon menu bar
CSS top navigation style example
CSS sticky note style effect
CSS horizontal scrolling menu
CSS vertical menu
CSS vertical scrolling menu
CSS fixed menu bar
CSS responsive login form
CSS fixed bottom menu bar
CSS drop-down menu
CSS alignment of drop-down content
CSS navigation bar drop-down menu
CSS navigation bar with search box
CSS navigation bar with search box- With submit button
CSS with search navigation bar-With mention search icon
CSS Fixed left navigation bar
CSS fixed left navigation bar – highly adaptive
HTML/CSS/JS Contact us form template (with Baidu map)
-
CSS Design a web page