chokcoco / iCSS

不止于 CSS
19.66k stars 2.01k forks source link

【翻译】系统性学习 CSS 指南及全 DEMO 练习 #168

Open chokcoco opened 2 years ago

chokcoco commented 2 years ago

本文内容源自:A Sorted List of CSS Code Examples: Master Styling HTML Elements

非完全直译,按照我的理解有所改动。

如果你是一名初学者,并且希望系统性的掌握 CSS,那么这里有一整套可供你理解并且模仿学习的 DEMO(HTML+CSS),并且是所见即所得。

CSS 知识点拆分

这里,首先我们会将整个 CSS 知识点分拆,分为:

1. Color 2. Backgrounds 3. Borders 4. Margins 5. Padding 6. Height and Width 7. Box Model 8. Outline 9. Text 10. Fonts 11. Links 12. Lists 13. Tables 14. Display 15. Position 16. Overflow 17. Float 18. Inline-Block 19. Align Elements 20. Combinators 21. Pseudo-Class 22. Pseudo-Elements 23. Opacity 24. Navigation Bars 25. Dropdowns 26. Images 27. Attribute Selectors 28. Forms 29. Counters 30. Website Layout 31. Transform 32. Transition 33. Animations 34. Tooltips 35. Buttons 36. Pagination 37. Multiple Columns 38. Grid 39. Flexbox 40. Media Queries 41. Responsive

基于每一个知识点,都提供了完善且充分的 DEMO 可以对照练习。其中的 DEMO 基本涵盖了该属性的所有知识点!

跟着这些 DEMO:

  1. 对于刚入门 CSS 的,对照着完整过一篇,可以巩固基础
  2. 而对于对 CSS 有一定掌握的,也可以对照选择性练习,查缺补漏
  3. 亦可以当做一本字典

Color

All CSS styles include the color property. You can pick color codes from our useful Pickeristic tool.

Backgrounds

The following list of CSS code examples illustrates different actions you can perform on page backgrounds. Learn to set colors or images as backgrounds and control the way they look on web sites.

Borders

These CSS code examples manipulate borders of HTML elements.

Margins

Practice setting the margin property for HTML elements in these CSS examples:

Padding

The CSS code examples below show the options for setting padding. You can use the shorthand or declare values in separate declarations:

Height and Width

Learn to set unique height and width properties for HTML elements.

Box Model

CSS box model indicates that browsers see HTML elements as rectangular boxes.

Outline

The following CSS code examples show the ways to control the outline property.

Text

CSS styles the text content with the following options:

Fonts

CSS code examples below show how to use fonts, specify font families, apply bold or italic effects, and so much more.

Links

You can also style links by setting colors, controlling states, etc.

Lists

Control the way lists are presented on your web pages by following the CSS code examples below.

Tables

The following CSS code examples help you change the default settings of tables.

Display

Practice hiding HTML elements and otherwise manipulating them with display with these CSS code examples:

Position

The following CSS code examples control the position of HTML elements.

Overflow

Learn to deal with text overflowing its content box.

Float

The CSS code examples below float elements to specified sides.

Inline-Block

These CSS code examples show the use of inline-block.

Align Elements

CSS styles elements by indicating their alignment.

Combinators

By using combinators, you can select specific HTML elements to style according to their relations to other elements.

Pseudo-Class

Practice using pseudo classes for styling elements in certain states.

Pseudo-Elements

The following CSS codes show how pseudo-elements style specific parts of elements.

Opacity

Set opacity for HTML elements and make them transparent.

Navigation Bars

The following CSS code examples show how to create and style navigation bars.

Dropdowns

By following the CSS codes below, you can create dropdown menus for your websites.

Images

CSS styles images as galleries, lets you create image sprites and manipulate such content in other ways.

Attribute Selectors

These CSS code examples teach you how to select and style elements according to their attributes.

Forms

CSS styles forms by indicating how input fields, submit buttons and text areas look.

Counters

The following code examples show the use of counters.

Website Layout

Control website layout by following the examples below.

Transform

Learn to use the transform property to rotate elements and create simple animations.

Transition

The CSS code examples below reveal the use of transitions to create animation effects on elements.

Animations

CSS can create animations for HTML elements by making them fade out, fade in, etc.

Tooltips

The following CSS codes illustrate the creation, styling, and positioning of tooltips.

Buttons

Learn to create and style buttons with different properties.

Pagination

Learn to organize many links with these CSS pagination examples.

Multiple Columns

These CSS code examples show how content can be divided into columns and styled with additional properties.

Grid

These code examples show how to manipulate grid (the layout of a web page).

Flexbox

Analyze these CSS code examples to learn how to create responsive websites by using flexbox.

Media Queries

Learn to make your website mobile-friendly by including @media and breakpoints.

Responsive

These CSS code examples reveal additional options for creating responsive web pages.

lzm0x219 commented 2 years ago

m

niusz commented 1 year ago

好像一篇都没有翻译呀