Contenido del Curso
CSS Fundamentals
CSS Fundamentals
1. Getting Started with CSS
What is CSS and Why is it Important?Linking CSS to an HTML DocumentMastering CSS Selectors for Styling HTML ElementsChallenge: Apply Your First CSS StylesChallenge: Style with Class SelectorsEnhancing Styles with User Action Pseudo-ClassesChallenge: Apply User Action Pseudo-ClassesChanging Text Colors in CSSOptimizing Workflow for Efficient CSS CodingChallenge: Use Variables for Better CSS Management
3. The CSS Box Model & Spacing Elements
What is the CSS Box Model?Understanding Box Sizing in CSSAdding Space with Margins and PaddingChallenge: Apply Box Sizing to ElementsUsing Structural and Functional Pseudo-ClassesChallenge: Practice Structural Pseudo-ClassesUnderstanding Block, Inline, and Inline-Block ElementsWorking with Block-Level ElementsWorking with Inline ElementsChallenge: Predict Page Layout with Different Element Types
Adding Shadows for Depth and Style
We can use box shadows to create a visual effect where an element appears to float above the background. This effect can create depth, highlight specific elements, and add visual interest to a webpage. To achieve it we can apply the box-shadow
property.
css
offset-x
refers to the horizontal positioning of the shadow, with a positive value shifting the shadow to the right of the element and a negative value shifting it to the left;offset-y
refers to the vertical positioning of the shadow, with a positive value shifting the shadow downwards and a negative value shifting it upwards;blur-radius
sets the degree of blurring for the shadow and is an optional value, with a higher value producing a more blurred shadow;spread-radius
is also optional, increases or decreases the size of the shadow based on its positive or negative value;color
specifies the color of the shadow using any valid color format, and is also an optional value.
index.html
index.css
Note
To find the best suited shadow visit the source shadow generator.
In addition to box-shadow
, text-shadow
and drop-shadow
properties allow us to create shadows for text and other elements, respectively. They work the same way as the box-shadow
property. However, these properties are used rarely in comparison with box-shadow.
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 5. Capítulo 5