CSS_Cheat_Sheet
CSS_Cheat_Sheet
===============
1. Selectors
------------
- Universal: *
- Type: element
- Class: .classname
- ID: #id
- Attribute: [attr=value]
2. Box Model
------------
3. Colors
---------
- Hex: #RRGGBB
- RGB: rgb(255, 0, 0)
- HSL: hsl(0, 100%, 50%)
4. Text
-------
- color: #333;
- font-size: 16px;
- font-weight: bold;
- text-align: center;
- line-height: 1.5;
5. Background
-------------
- background-color: #f0f0f0;
- background-image: url('image.jpg');
- background-size: cover;
- background-repeat: no-repeat;
- background-position: center;
6. Positioning
--------------
7. Flexbox
----------
- display: flex;
- justify-content: center;
- align-items: center;
- flex-direction: row;
- gap: 10px;
8. Grid
-------
- display: grid;
- gap: 10px;
- grid-column: 1 / span 2;
9. Animation
------------
- animation-name: slideIn;
- animation-duration: 2s;
- animation-timing-function: ease-in-out;
- animation-iteration-count: infinite;
@keyframes slideIn {
to { transform: translateX(0); }