- Mastering CSS
- Rich Finelli
- 73字
- 2021-07-08 09:45:57
Targeting .column using a pseudo class
Adding the .column:first-child selector will target the first appearance of the column element. We'll add margin-left as zero. When we save this, we get three equal columns with a margin-left for each of them, except the first:
.column:first-child { margin-left: 0; }
Following is the output of preceding code block:

This technique would work just as well with two columns, four columns, or any number of columns.
推薦閱讀
- 少兒人工智能趣味入門:Scratch 3.0動畫與游戲編程
- Unity 2020 Mobile Game Development
- 數據結構簡明教程(第2版)微課版
- Python機器學習實戰
- Python機器學習經典實例
- Java應用開發技術實例教程
- HTML5從入門到精通 (第2版)
- Java EE 8 Application Development
- Windows內核編程
- Python機器學習算法: 原理、實現與案例
- 大話Java:程序設計從入門到精通
- Visual Basic程序設計習題與上機實踐
- 零基礎學C語言程序設計
- 深度學習原理與PyTorch實戰(第2版)
- 從零開始構建深度前饋神經網絡:Python+TensorFlow 2.x