Elementi CSS supportati da AMP per e-mail
Important: this documentation is not applicable to your currently selected format websites!
Questo documento descrive le funzionalità CSS attualmente supportate nelle e-mail AMP.
Applicazione di CSS
Fogli di stile interno
Utilizzando fogli di stile interni, il codice CSS viene specificato all'interno di un singolo tag <style amp-custom> situato nel tag <head> dell'email.
Stili inline
Oltre ai fogli di stile interni, è possibile specificare elementi di stile inline su qualsiasi elemento utilizzando l'attributo style.
Fogli di stile esterni
I fogli di stile esterni non sono supportati in AMP per e-mail.
L'uso di <link rel="stylesheet" href="..."> non è consentito in nessun punto delle e-mail.
Selettori CSS supportati
Selettori semplici
- Selettore di tipo elementname
- Selettore di classi .classname
- Selettore ID #idname
- Selettore universale *
- Selettore di attributi [attr=value]
Combinatori
- Combinatore di elementi di pari livello adiacenti A + B
- Combinatore di elementi di pari livello generali A ~ B
- Combinatore di elementi figli A > B
- Combinatore di discendenti A B
Pseudo-classi
- :active
- :checked
- :default
- :disabled
- :empty
- :enabled
- :first-child
- :first-of-type
- :focus
- :focus-within
- :hover
- :in-range
- :indeterminate
- :invalid
- :last-child
- :last-of-type
- :last-of-type
- :not
- :nth-child
- :nth-last-child
- :nth-last-of-type
- :nth-of-type
- :only-child
- :only-of-type
- :optional
- :out-of-range
- :read-only
- :read-write
- :required
- :valid
Proprietà CSS supportate
- -moz-appearance
- -webkit-appearance
- -webkit-tap-highlight-color
- align-content
- align-items
- align-self
- appearance
- azimuth
- background
- background-attachment
- background-blend-mode
- background-clip
- background-color
- background-image
- background-origin
- background-position
- background-repeat
- background-size
- border
- border-bottom
- border-bottom-color
- border-bottom-left-radius
- border-bottom-right-radius
- border-bottom-style
- border-bottom-width
- border-collapse
- border-color
- border-left
- border-left-color
- border-left-style
- border-left-width
- border-radius
- border-right
- border-right-color
- border-right-style
- border-right-width
- border-spacing
- border-style
- border-top
- border-top-color
- border-top-left-radius
- border-top-right-radius
- border-top-style
- border-top-width
- border-width
- bottom
- box-shadow
- box-sizing
- break-after
- break-before
- break-inside
- caption-side
- caret-color
- clear
- color
- color-adjust
- column-count
- column-fill
- column-gap
- column-rule
- column-rule-color
- column-rule-style
- column-rule-width
- column-span
- column-width
- columns
- counter-increment
- counter-reset
- cursor
- direction
- display
- elevation
- empty-cells
- filter
- flex
- flex-basis
- flex-direction
- flex-flow
- flex-grow
- flex-shrink
- flex-wrap
- float
- font
- font-family
- font-feature-settings
- font-kerning
- font-size
- font-size-adjust
- font-stretch
- font-style
- font-synthesis
- font-variant
- font-variant-alternates
- font-variant-caps
- font-variant-east-asian
- font-variant-ligatures
- font-variant-numeric
- font-variation-settings
- font-weight
- gap
- grid
- grid-area
- grid-auto-columns
- grid-auto-flow
- grid-auto-rows
- grid-column
- grid-column-end
- grid-column-start
- grid-row
- grid-row-end
- grid-row-start
- grid-template
- grid-template-areas
- grid-template-columns
- grid-template-rows
- height
- hyphens
- image-orientation
- image-resolution
- inline-size
- isolation
- justify-content
- justify-items
- justify-self
- left
- letter-spacing
- line-break
- line-height
- list-style
- list-style-position
- list-style-type
- margin
- margin-bottom
- margin-left
- margin-right
- margin-top
- max-height
- max-width
- min-height
- min-width
- mix-blend-mode
- object-fit
- object-position
- offset-distance
- opacity
- order
- outline
- outline-color
- outline-offset
- outline-style
- outline-width
- overflow
- overflow-x
- overflow-y
- overflow-wrap
- padding
- padding-bottom
- padding-left
- padding-right
- padding-top
- pause
- pause-after
- pause-before
- perspective
- perspective-origin
- pitch
- pitch-range
- place-items
- position
- quotes
- resize
- richness
- right
- row-gap
- speak
- speak-header
- speak-numeral
- speak-punctuation
- speech-rate
- stress
- table-layout
- text-align
- text-align-last
- text-combine-upright
- text-decoration
- text-decoration-color
- text-decoration-line
- text-decoration-skip
- text-decoration-style
- text-emphasis
- text-emphasis-color
- text-emphasis-position
- text-emphasis-style
- text-indent
- text-justify
- text-orientation
- text-overflow
- text-shadow
- text-transform
- text-underline-position
- top
- transform
- transform-box
- transform-origin
- transform-style
- transition
- transition-delay
- transition-duration
- transition-property
- transition-timing-function
- unicode-bidi
- vertical-align
- visibility
- voice-family
- white-space
- width
- word-break
- word-spacing
- word-wrap
- writing-mode
- z-index
Restrizioni aggiuntive
Le seguenti proprietà CSS hanno limitazioni aggiuntive:
| Proprietà | Restrizioni | 
|---|---|
| cursor | Gli unici valori consentiti sono pointereinitial. | 
| filter | url()non è consentito. | 
| transition | È possibile animare solo opacity,transform,visibilityeoffset-distance. | 
| visibility | Gli unici valori consentiti sono hidden,visibleeinitial. | 
| z-index | Sono consentiti solo valori compresi tra -100 e 100. | 
At-rule
L'unica at-rule attualmente supportata è @media. Consultare le Funzionalità multimediali per ulteriori informazioni.
Caratteri personalizzati (@font-face) 
I caratteri personalizzati non sono supportati in AMP per email.
Funzionalità multimediali
Elenco delle funzionalità multimediali supportate per l'applicazione condizionale delle regole tramite query @media.
- device-width
- max-device-width
- min-device-width
- hover
- orientation
- pointer
- resolution
- max-resolution
- min-resolution
- width
- max-width
- min-width