CSS Reference icon CSS Reference type
  • All properties
  • Animations
  • Backgrounds
  • Box model
  • Flexbox
  • Positioning
  • Transitions
  • Typography
  • align-content
  • align-items
  • align-self
  • animation-delay
  • animation-direction
  • animation-duration
  • animation-fill-mode
  • animation-iteration-count
  • animation-name
  • animation-play-state
  • animation-timing-function
  • animation
  • background-attachment
  • background-clip
  • background-color
  • background-image
  • background-origin
  • background-position
  • background-repeat
  • background-size
  • background
  • border-bottom-color
  • border-bottom-left-radius
  • border-bottom-right-radius
  • border-bottom-style
  • border-bottom-width
  • border-bottom
  • border-collapse
  • border-color
  • border-left-color
  • border-left-style
  • border-left-width
  • border-left
  • border-radius
  • border-right-color
  • border-right-style
  • border-right-width
  • border-right
  • border-style
  • border-top-color
  • border-top-left-radius
  • border-top-right-radius
  • border-top-style
  • border-top-width
  • border-top
  • border-width
  • border
  • bottom
  • box-shadow
  • box-sizing
  • clear
  • color
  • column-count
  • column-gap
  • column-width
  • content
  • cursor
  • display
  • flex-basis
  • flex-direction
  • flex-flow
  • flex-grow
  • flex-shrink
  • flex-wrap
  • float
  • font-family
  • font-size
  • font-style
  • font-variant
  • font-weight
  • font
  • height
  • justify-content
  • left
  • letter-spacing
  • line-height
  • list-style-image
  • list-style-position
  • list-style-type
  • list-style
  • margin-bottom
  • margin-left
  • margin-right
  • margin-top
  • margin
  • max-height
  • max-width
  • min-height
  • min-width
  • mix-blend-mode
  • opacity
  • order
  • outline-color
  • outline-style
  • outline-width
  • outline
  • overflow-wrap
  • overflow-x
  • overflow-y
  • overflow
  • padding-bottom
  • padding-left
  • padding-right
  • padding-top
  • padding
  • pointer-events
  • position
  • resize
  • right
  • text-align
  • text-decoration
  • text-indent
  • text-overflow
  • text-shadow
  • text-transform
  • top
  • transform-origin
  • transform
  • transition-delay
  • transition-duration
  • transition-property
  • transition-timing-function
  • transition
  • white-space
  • width
  • will-change
  • word-break
  • word-spacing
  • z-index
Close

CSS 属性可视化文档 Created by @jgthms Translated into Chinese by @Poetries

In collection: positioning Permalink Share MDN

#right

Defines the position of the element according to its right edge.

默认属性 right: auto;

The element will remain in its natural position.

Parent container

Natural position
Actual position

right: 80px;

If the element is in position relative, the element will move right by the amount defined by the right value.

Parent container

Natural position
Actual position

right: -20px;

If the element is in position absolute, the element will position itself from the right of the first positioned ancestor.

Parent container

Natural position
Actual position

分享给其他好友