scroll-snap-align
Quick Summary for scroll-snap-align
The scroll-snap-align property specifies the box's snap position as an alignment of its snap area (as the alignment subject) within its snap container's snapport (as the alignment container). The two values specify the snapping alignment in the block axis and inline axis, respectively. If only one value is specified, the second value defaults to the same value.
Code Usage for scroll-snap-align
/* Keyword values */ scroll-snap-align: none; scroll-snap-align: start end; /* when two values set first is block, second inline */ scroll-snap-align: center;  /* Global values */ scroll-snap-align: inherit; scroll-snap-align: initial; scroll-snap-align: revert; scroll-snap-align: unset; 
More Details for scroll-snap-align

scroll-snap-align

The scroll-snap-align property specifies the box's snap position as an alignment of its snap area (as the alignment subject) within its snap container's snapport (as the alignment container). The two values specify the snapping alignment in the block axis and inline axis, respectively. If only one value is specified, the second value defaults to the same value.

Syntax

/* Keyword values */ scroll-snap-align: none; scroll-snap-align: start end; /* when two values set first is block, second inline */ scroll-snap-align: center;  /* Global values */ scroll-snap-align: inherit; scroll-snap-align: initial; scroll-snap-align: revert; scroll-snap-align: unset; 

Values

none

The box does not define a snap position in that axis.

start

The start alignment of this box's scroll snap area, within the scroll container's snapport is a snap position in this axis.

end

The end alignment of this box's scroll snap area, within the scroll container's snapport is a snap position in this axis.

center

The center alignment of this box's scroll snap area, within the scroll container's snapport is a snap position in this axis.

Safari currently has the two value syntax in the wrong order, the first value being inline the second block. See bug #191865.

Formal definition

Initial valuenone
Applies toall elements
Inheritedno
Computed valueas specified
Animation typediscrete

Formal syntax

[ none | start | end | center ]{1,2}

Specifications

Specification
CSS Scroll Snap Module Level 1 # scroll-snap-align

See also

CSS Scroll Snap Well-Controlled Scrolling with CSS Scroll Snap

No Items Found.

Add Comment
Type in a Nick Name here
 
Other Categories in CSS
css
Search CSS
Search CSS by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code here, mostly for my reference. Also if i find a good link, i usually add it here and then forget about it. more...

Subscribe to weekly updates about things i have added to the site or thought interesting during the last week.

You could also follow me on twitter or not... does anyone even use twitter anymore?

If you found something useful or like my work, you can buy me a coffee here. Mmm Coffee. ☕

❤️👩‍💻🎮

🪦 2000 - 16 Oct 2022 - Boots
Random Quote
Nothing, to my way of thinking, is a better proof of a well ordered mind than a man's ability to stop just where he is and pass some time in his own company.
Seneca
Random CSS Property

<shape>

Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.
<shape> css reference