Today I will create a recruitment page for a company. I finish the design drawings in the morning and start typesetting in the afternoon. The page copied the recruitment page of a talent bureau that I created before, and the navigation bar and banner came out quickly. I have used lists in some places in this content, and of course I have to use
- tags. The list items (small dots) are made into small green squares. At this time, I thought if there was a CSS property for customizing the list items. No need to know, it really does exist. list-style can define list-style-type, list-style-position and list-style-image. These three attributes can be written together. list-style-image is exactly the custom list item pattern.
Before I started defining them, I encountered two problems: 1. The small dots in the default style of the
- tag were missing. After checking, I found that the initialization style sheet
- defined list-style: none, which caused the default small dots to be removed. Then we need to define the list-style of
- needs to set a fixed height, setting it is useless. After careful inspection, it turns out that predecessors have already had experience with custom patterns: Option 1, include a blank space at the bottom when cutting the list item pattern. This plan must ensure that the blank space of the pattern is consistent with the background color of the page. I think this solution is not elegant because the font may become larger or smaller and therefore cannot be reused. Option 2, use the background attribute to customize the item list pattern. This solution can flexibly control the position of the pattern, and the spacing between the text and the pattern is also easy to control (I will not tell you to use padding to control the spacing). To sum up, it actually makes sense for the initialization style sheet to remove the default dots of
- . First, in most cases, list items are not used. Second, using list-style to customize list items is really difficult to control.
- . 2. List-style-position has two optional values: insite and outsite. There is no problem when using insite (list items are inside the line), but when using outsite (list items are outside the line), the small dots disappear. It turns out that the initialization style sheet defines
as overflow: hidden, and the part that overflows
will be cut off. And
- is contained in
, so
cuts off the overflowing list items. Just define
as the default visible here.
You can start customizing the list pattern. First, cut the pattern out of PS and save it in the designated location. Define list-style-image: url(i/icon.gif). The problem is, the pattern is not horizontally centered with the text. Baidu, Japan
The above is the detailed content of Summary of using custom list items list-style. For more information, please follow other related articles on the PHP Chinese website!

The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.

The roles of HTML, CSS and JavaScript in web development are: HTML is responsible for content structure, CSS is responsible for style, and JavaScript is responsible for dynamic behavior. 1. HTML defines the web page structure and content through tags to ensure semantics. 2. CSS controls the web page style through selectors and attributes to make it beautiful and easy to read. 3. JavaScript controls web page behavior through scripts to achieve dynamic and interactive functions.

HTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.

HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.

HTML is a language used to build web pages, defining web page structure and content through tags and attributes. 1) HTML organizes document structure through tags, such as,. 2) The browser parses HTML to build the DOM and renders the web page. 3) New features of HTML5, such as, enhance multimedia functions. 4) Common errors include unclosed labels and unquoted attribute values. 5) Optimization suggestions include using semantic tags and reducing file size.

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

The role of HTML is to define the structure and content of a web page through tags and attributes. 1. HTML organizes content through tags such as , making it easy to read and understand. 2. Use semantic tags such as, etc. to enhance accessibility and SEO. 3. Optimizing HTML code can improve web page loading speed and user experience.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Notepad++7.3.1
Easy-to-use and free code editor

WebStorm Mac version
Useful JavaScript development tools

Dreamweaver Mac version
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)