Skip to the content.

Angular > CSS3


Cascading Style Sheets

Learn to style web pages using CSS3, including layout, visual design, and responsive techniques.


🎯 Alignment & Positioning

.box {
  position: absolute;
  top: 50px;
  left: 100px;
  z-index: 10;
  text-align: center;
}

📦 Box Model & Layout

.container {
  margin: 20px;
  padding: 10px;
  border: 2px solid #ccc;
  width: 100%;
  box-sizing: border-box;
  overflow: auto;
}

💅 Visual Styling

.card {
  background-color: #f9f9f9;
  color: #333;
  font-family: Arial, sans-serif;
  font-size: 16px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  opacity: 0.95;
}

📐 Flexbox & Grid

.flex-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.grid-container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px;
}

🔗 CSS Tricks - A Complete Guide to Flexbox


📱 Responsive Design

@media (max-width: 768px) {
  .container {
    padding: 5%;
  }

  h1 {
    font-size: 1.5rem;
  }
}

img {
  max-width: 100%;
  height: auto;
}

🌀 Transitions & Animations

.button {
  background-color: #008CBA;
  transition: background-color 0.3s ease;
}

.button:hover {
  background-color: #005f73;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 2s ease-in;
}

🌈 CSS Variables

:root {
  --main-color: #3498db;
  --padding: 20px;
}

.box {
  color: var(--main-color);
  padding: var(--padding);
}

References


🔗 Related Topics: