-
Hajipur, Bihar, 844101
Hajipur, Bihar, 844101
CSS Basics
CSS Styling Properties
CSS Box Model
CSS Margin
CSS Padding
CSS Borders
CSS Outline
CSS Height/Width
CSS Max-width
CSS Display
CSS Position
CSS Z-index
CSS Overflow
CSS Float
CSS Inline-block
CSS Align
CSS Box Sizing
CSS Text
CSS Fonts
CSS Icons
CSS Text Effects
CSS Web Fonts
CSS Colors
CSS Backgrounds
CSS Color Keywords
CSS Gradients
CSS Shadows
CSS Links
CSS Lists
CSS Tables
CSS Advanced Selectors & Features
CSS Combinators
CSS Pseudo-classes
CSS Pseudo-elements
CSS Attribute Selectors
CSS Specificity
CSS !important
CSS Units
CSS Variables
CSS @property
CSS Math Functions
CSS Media and Image Styling
CSS Image Styling
CSS Image Centering
CSS Image Filters
CSS Image Shapes
CSS object-fit
CSS object-position
CSS Masking
CSS Layout Techniques
CSS Website Layout
CSS Navigation Bar
CSS Dropdowns
CSS Image Gallery
CSS Counters
CSS Pagination
CSS Multiple Columns
CSS User Interface
CSS Flexbox
CSS Grid
CSS Responsive Design (RWD)
CSS User Interface (UI) refers to a set of CSS properties that control how elements behave visually in response to user interaction. These include cursor behavior, element resizing, text selection, and how elements are focused.
UI properties improve user experience by making websites more interactive and user-friendly.
Property | Description |
---|---|
cursor |
Changes the mouse cursor when hovering over an element |
resize |
Allows elements (like textareas) to be resizable |
outline |
A line drawn around an element (often for focus) |
box-sizing |
Controls box model calculation |
user-select |
Enables or disables text selection |
pointer-events |
Enables or disables mouse interactions |
caret-color |
Changes the color of the text input cursor |
button {
cursor: pointer;
}
Available values: default
, pointer
, wait
, move
, text
, crosshair
, not-allowed
, etc.
textarea {
resize: both; /* horizontal, vertical, none, both */
}
p {
user-select: none; /* disables text selection */
}
button.disabled {
pointer-events: none; /* disables click */
opacity: 0.5;
}
input {
caret-color: red;
}
✅ Write CSS for the following:
Q1. Change the cursor to a hand icon on a clickable element.
Q2. Disable text selection for a paragraph.
Q3. Make a <textarea>
resizable only vertically.
Q4. Hide the default focus outline on buttons.
Q5. Change the caret color in an input field.
Q6. Apply box-sizing: border-box
to all elements.
Q7. Prevent clicks on a disabled button using pointer-events
.
Q8. Make an image unselectable using user-select
.
Q9. Add a custom move
cursor for draggable items.
Q10. Highlight focused input fields with a green outline.
CSS Basics
CSS Styling Properties
CSS Box Model
CSS Margin
CSS Padding
CSS Borders
CSS Outline
CSS Height/Width
CSS Max-width
CSS Display
CSS Position
CSS Z-index
CSS Overflow
CSS Float
CSS Inline-block
CSS Align
CSS Box Sizing
CSS Text
CSS Fonts
CSS Icons
CSS Text Effects
CSS Web Fonts
CSS Colors
CSS Backgrounds
CSS Color Keywords
CSS Gradients
CSS Shadows
CSS Links
CSS Lists
CSS Tables
CSS Advanced Selectors & Features
CSS Combinators
CSS Pseudo-classes
CSS Pseudo-elements
CSS Attribute Selectors
CSS Specificity
CSS !important
CSS Units
CSS Variables
CSS @property
CSS Math Functions
CSS Media and Image Styling
CSS Image Styling
CSS Image Centering
CSS Image Filters
CSS Image Shapes
CSS object-fit
CSS object-position
CSS Masking
CSS Layout Techniques
CSS Website Layout
CSS Navigation Bar
CSS Dropdowns
CSS Image Gallery
CSS Counters
CSS Pagination
CSS Multiple Columns
CSS User Interface
CSS Flexbox
CSS Grid
CSS Responsive Design (RWD)