Zespół pomocy ds. usługi porównywania cen
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Możesz formatować e-maile wysyłane do Gmaila za pomocą bloków <style>
w tekście i standardowego CSS. Obsługiwana jest większość selektorów CSS, atrybutów i zapytań o media.
Nieobsługiwane właściwości i selektory CSS mogą być ignorowane przez Gmaila.
Pełną listę obsługiwanych właściwości i zapytań CSS znajdziesz w przewodniku.
Selektory CSS
Do stosowania stylów możesz używać podzbioru selektorów CSS. Gmail obsługuje selektory klas, elementów i identyfikatorów.
Przykład
<html>
<head>
<style>
.colored {
color: blue;
}
#body {
font-size: 14px;
}
</style>
</head>
<body>
<div id='body'>
<p>Hi Pierce,</p>
<p class='colored'>This text is blue.</p>
<p>Jerry</p>
</div>
</body>
</html>
Możesz użyć standardowych typów mediów CSS, aby dostosować styl e-maila do urządzenia, z którego korzysta użytkownik. Gmail obsługuje zapytania dotyczące szerokości ekranu, orientacji i rozdzielczości.
Przykład
<html>
<head>
<style>
.colored {
color: blue;
}
#body {
font-size: 14px;
}
@media screen and (min-width: 500px) {
.colored {
color:red;
}
}
</style>
</head>
<body>
<div id='body'>
<p>Hi Pierce,</p>
<p class='colored'>
This text is blue if the window width is
below 500px and red otherwise.
</p>
<p>Jerry</p>
</div>
</body>
</html>
Obsługiwane właściwości i zapytania CSS
Gmail obsługuje te właściwości CSS:
- azimuth
- tło
- 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
- box-sizing
- break-after
- break-before
- włamanie
- caption-side
- clear,
- kolor
- column-count
- wypełnienie kolumny
- column-gap
- column-rule
- column-rule-color
- column-rule-style
- column-rule-width
- column-span
- column-width
- kolumny
- direction
- Wyświetlacz
- elevation
- empty-cells
- liczba zmiennoprzecinkowa
- czcionka
- 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-weight
- wysokość
- image-orientation
- image-resolution
- ime-mode
- odizolowanie
- layout-flow
- layout-grid
- layout-grid-char
- layout-grid-char-spacing
- layout-grid-line
- layout-grid-mode
- layout-grid-type
- letter-spacing
- line-break
- line-height
- list-style
- list-style-position
- list-style-type
- margin
- margin-bottom
- margin-left,
- margin-right
- margin-top
- marker-offset
- max-height
- max-width,
- min-height,
- min-width
- mix-blend-mode
- object-fit
- object-position
- opacity
- konspekt
- outline-color
- outline-style,
- outline-width
- overflow
- overflow-x
- overflow-y
- padding
- padding-bottom
- padding-left,
- padding-right,
- padding-top
- page-break-after
- page-break-before
- page-break-inside
- wstrzymaj
- pause-after
- pause-before
- rzut
- pitch-range
- cytaty
- richness
- mowa
- speak-header
- speak-numeral
- speak-punctuation
- speech-rate
- naprężenie
- table-layout
- text-align
- text-align-last
- text-autospace
- text-combine-upright
- text-decoration
- text-decoration-color
- text-decoration-line
- text-decoration-skip
- text-decoration-style
- text-emphasis
- text-emphasis-color
- text-emphasis-style
- text-indent
- text-justify
- text-kashida-space
- text-orientation
- text-overflow
- text-transform
- text-underline-position
- unicode-bidi
- vertical-align
- voice-family
- white-space
- width,
- word-break,
- word-spacing,
- word-wrap
- writing-mode
- zoom
Typy obsługiwane
Obsługiwane zapytania
- min-width
- max-width
- min-device-width
- max-device-width
- orientacja,
- min-resolution
- max-resolution
Obsługiwane słowa kluczowe
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-08-29 UTC.
[null,null,["Ostatnia aktualizacja: 2025-08-29 UTC."],[],[],null,["# CSS Support\n\nYou can style email sent to Gmail using inline `\u003cstyle\u003e` blocks and\nstandard CSS. Most CSS selectors, attributes, and media-queries are supported.\nUnsupported CSS properties and selectors may be ignored by Gmail.\n\nSee the reference guide for a complete list of\n[supported CSS properties and queries](#supported_css).\n\nCSS Selectors\n-------------\n\nYou can use a subset of CSS selectors to apply styles. Gmail supports class,\nelement, and id selectors.\n\n### Example\n\n \u003chtml\u003e\n \u003chead\u003e\n \u003cstyle\u003e\n .colored {\n color: blue;\n }\n #body {\n font-size: 14px;\n }\n \u003c/style\u003e\n \u003c/head\u003e\n \u003cbody\u003e\n \u003cdiv id='body'\u003e\n \u003cp\u003eHi Pierce,\u003c/p\u003e\n \u003cp class='colored'\u003eThis text is blue.\u003c/p\u003e\n \u003cp\u003eJerry\u003c/p\u003e\n \u003c/div\u003e\n \u003c/body\u003e\n \u003c/html\u003e\n\nCSS Media Queries\n-----------------\n\nYou can use standard CSS media queries to adjust the styling of an email to\nsuit the user's current device. Gmail supports queries against the screen width,\norientation, and resolution.\n\n### Example\n\n \u003chtml\u003e\n \u003chead\u003e\n \u003cstyle\u003e\n .colored {\n color: blue;\n }\n #body {\n font-size: 14px;\n }\n @media screen and (min-width: 500px) {\n .colored {\n color:red;\n }\n }\n \u003c/style\u003e\n \u003c/head\u003e\n \u003cbody\u003e\n \u003cdiv id='body'\u003e\n \u003cp\u003eHi Pierce,\u003c/p\u003e\n \u003cp class='colored'\u003e\n This text is blue if the window width is\n below 500px and red otherwise.\n \u003c/p\u003e\n \u003cp\u003eJerry\u003c/p\u003e\n \u003c/div\u003e\n \u003c/body\u003e\n \u003c/html\u003e\n\nSupported CSS properties \\& queries\n-----------------------------------\n\nThe following CSS properties are supported in Gmail:\n\n- azimuth\n- background\n- background-blend-mode\n- background-clip\n- background-color\n- background-image\n- background-origin\n- background-position\n- background-repeat\n- background-size\n- border\n- border-bottom\n- border-bottom-color\n- border-bottom-left-radius\n- border-bottom-right-radius\n- border-bottom-style\n- border-bottom-width\n- border-collapse\n- border-color\n- border-left\n- border-left-color\n- border-left-style\n- border-left-width\n- border-radius\n- border-right\n- border-right-color\n- border-right-style\n- border-right-width\n- border-spacing\n- border-style\n- border-top\n- border-top-color\n- border-top-left-radius\n- border-top-right-radius\n- border-top-style\n- border-top-width\n- border-width\n- box-sizing\n- break-after\n- break-before\n- break-inside\n- caption-side\n- clear\n- color\n- column-count\n- column-fill\n- column-gap\n- column-rule\n- column-rule-color\n- column-rule-style\n- column-rule-width\n- column-span\n- column-width\n- columns\n- direction\n- display\n- elevation\n- empty-cells\n- float\n- font\n- font-family\n- font-feature-settings\n- font-kerning\n- font-size\n- font-size-adjust\n- font-stretch\n- font-style\n- font-synthesis\n- font-variant\n- font-variant-alternates\n- font-variant-caps\n- font-variant-east-asian\n- font-variant-ligatures\n- font-variant-numeric\n- font-weight\n- height\n- image-orientation\n- image-resolution\n- ime-mode\n- isolation\n- layout-flow\n- layout-grid\n- layout-grid-char\n- layout-grid-char-spacing\n- layout-grid-line\n- layout-grid-mode\n- layout-grid-type\n- letter-spacing\n- line-break\n- line-height\n- list-style\n- list-style-position\n- list-style-type\n- margin\n- margin-bottom\n- margin-left\n- margin-right\n- margin-top\n- marker-offset\n- max-height\n- max-width\n- min-height\n- min-width\n- mix-blend-mode\n- object-fit\n- object-position\n- opacity\n- outline\n- outline-color\n- outline-style\n- outline-width\n- overflow\n- overflow-x\n- overflow-y\n- padding\n- padding-bottom\n- padding-left\n- padding-right\n- padding-top\n- page-break-after\n- page-break-before\n- page-break-inside\n- pause\n- pause-after\n- pause-before\n- pitch\n- pitch-range\n- quotes\n- richness\n- speak\n- speak-header\n- speak-numeral\n- speak-punctuation\n- speech-rate\n- stress\n- table-layout\n- text-align\n- text-align-last\n- text-autospace\n- text-combine-upright\n- text-decoration\n- text-decoration-color\n- text-decoration-line\n- text-decoration-skip\n- text-decoration-style\n- text-emphasis\n- text-emphasis-color\n- text-emphasis-style\n- text-indent\n- text-justify\n- text-kashida-space\n- text-orientation\n- text-overflow\n- text-transform\n- text-underline-position\n- unicode-bidi\n- vertical-align\n- voice-family\n- white-space\n- width\n- word-break\n- word-spacing\n- word-wrap\n- writing-mode\n- zoom\n\n### Supported media queries\n\n#### Supported types\n\n- all\n- screen\n\n#### Supported queries\n\n- min-width\n- max-width\n- min-device-width\n- max-device-width\n- orientation\n- min-resolution\n- max-resolution\n\n#### Supported keywords\n\n- and\n- only"]]