{"id":74323,"date":"2024-06-27T13:43:08","date_gmt":"2024-06-27T06:43:08","guid":{"rendered":"https:\/\/itviec.com\/blog\/?p=74323"},"modified":"2024-06-27T13:43:08","modified_gmt":"2024-06-27T06:43:08","slug":"background-css","status":"publish","type":"post","link":"https:\/\/itviec.com\/blog\/background-css\/","title":{"rendered":"H\u01b0\u1edbng d\u1eabn chi ti\u1ebft c\u00e1ch d\u00f9ng 8 thu\u1ed9c t\u00ednh background CSS"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">N\u1ed9i dung b\u00e0i vi\u1ebft<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/itviec.com\/blog\/background-css\/#Background_CSS_la_gi\" >Background CSS l\u00e0 g\u00ec?\u00a0<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/itviec.com\/blog\/background-css\/#Vai_tro_cua_background_CSS_trong_thiet_ke_website\" >Vai tr\u00f2 c\u1ee7a background CSS trong thi\u1ebft k\u1ebf website<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/itviec.com\/blog\/background-css\/#Huong_dan_cach_dung_8_thuoc_tinh_background_CSS\" >H\u01b0\u1edbng d\u1eabn c\u00e1ch d\u00f9ng 8 thu\u1ed9c t\u00ednh background CSS<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/itviec.com\/blog\/background-css\/#3_vi_du_ve_cach_su_dung_background_CSS\" >3 v\u00ed d\u1ee5 v\u1ec1 c\u00e1ch s\u1eed d\u1ee5ng background CSS<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/itviec.com\/blog\/background-css\/#Cac_cau_hoi_thuong_gap_ve_background_CSS\" >C\u00e1c c\u00e2u h\u1ecfi th\u01b0\u1eddng g\u1eb7p v\u1ec1 background CSS<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/itviec.com\/blog\/background-css\/#Tong_ket_Background_CSS\" >T\u1ed5ng k\u1ebft Background CSS<\/a><\/li><\/ul><\/nav><\/div>\n<p><em><strong>CSS cung c\u1ea5p cho c\u00e1c front-end developer b\u1ed9 c\u00f4ng c\u1ee5 \u0111\u1ea7y \u0111\u1ee7 v\u00e0 linh ho\u1ea1t \u0111\u1ec3 t\u00f9y ch\u1ec9nh giao di\u1ec7n trang web, bao g\u1ed3m c\u1ea3 vi\u1ec7c t\u1ea1o background cho c\u00e1c ph\u1ea7n t\u1eed HTML. Trong b\u00e0i vi\u1ebft n\u00e0y, ITviec s\u1ebd h\u01b0\u1edbng d\u1eabn chi ti\u1ebft c\u00e1ch s\u1eed d\u1ee5ng 8 thu\u1ed9c t\u00ednh background quan tr\u1ecdng trong CSS, gi\u00fap b\u1ea1n t\u1ea1o ra nh\u1eefng trang web \u0111\u1eb9p m\u1eaft v\u00e0 \u1ea5n t\u01b0\u1ee3ng.<\/strong><\/em><\/p>\n<p>\u0110\u1ecdc b\u00e0i vi\u1ebft n\u00e0y \u0111\u1ec3 hi\u1ec3u r\u00f5:<\/p>\n<ul>\n<li>Thu\u1ed9c t\u00ednh Background trong CSS l\u00e0 g\u00ec?<\/li>\n<li>V\u00ec sao c\u1ea7n s\u1eed d\u1ee5ng thu\u1ed9c t\u00ednh background khi thi\u1ebft k\u1ebf website?<\/li>\n<li>C\u00e1ch s\u1eed d\u1ee5ng 8 thu\u1ed9c t\u00ednh c\u01a1 b\u1ea3n c\u1ee7a background CSS<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Background_CSS_la_gi\"><\/span><b>Background CSS l\u00e0 g\u00ec?\u00a0<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Background CSS l\u00e0 m\u1ed9t thu\u1ed9c t\u00ednh t\u1ed1c k\u00fd (shorthand) \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 x\u00e1c \u0111\u1ecbnh v\u00e0 ki\u1ec3m so\u00e1t background (n\u1ec1n) c\u1ee7a m\u1ed9t ph\u1ea7n t\u1eed th\u00f4ng qua vi\u1ec7c thi\u1ebft l\u1eadp 8 y\u1ebfu t\u1ed1 ph\u1ee5 kh\u00e1c g\u1ed3m:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>background-color:<\/b><span style=\"font-weight: 400;\"> Thi\u1ebft l\u1eadp m\u00e0u c\u1ee7a background cho ph\u1ea7n t\u1eed.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>background-image: <\/b><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp h\u00ecnh \u1ea3nh l\u00e0m background cho ph\u1ea7n t\u1eed.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>background-repeat:<\/b><span style=\"font-weight: 400;\"> Thi\u1ebft l\u1eadp c\u00e1ch background \u0111\u01b0\u1ee3c l\u1eb7p l\u1ea1i.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>background-attachment: <\/b><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp c\u00e1ch background g\u1eafn v\u1edbi ph\u1ea7n t\u1eed khi cu\u1ed9n trang.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>background-position: <\/b><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp v\u1ecb tr\u00ed c\u1ee7a background trong ph\u1ea7n t\u1eed.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>background-origin: <\/b><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp v\u1ecb tr\u00ed b\u1eaft \u0111\u1ea7u hi\u1ec3n th\u1ecb background.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>background-clip:<\/b><span style=\"font-weight: 400;\"> Thi\u1ebft l\u1eadp v\u1ecb tr\u00ed c\u1eaft background khi b\u1ecb ch\u1ed3ng ch\u00e9o v\u1edbi n\u1ed9i dung ph\u1ea7n t\u1eed.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>background-size:<\/b><span style=\"font-weight: 400;\"> Thi\u1ebft l\u1eadp k\u00edch th\u01b0\u1edbc c\u1ee7a background.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">V\u00ed d\u1ee5 c\u00fa ph\u00e1p thi\u1ebft l\u1eadp c\u00e1c y\u1ebfu t\u1ed1 trong background CSS:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">&lt;!DOCTYPE html&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;html&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;head&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;style&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">body {\u00a0<\/span>\r\n\r\n<span style=\"font-weight: 400;\">background-color: lightblue;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">background-image: url(\"img_tree.gif\");<\/span>\r\n\r\n<span style=\"font-weight: 400;\">background-repeat: no-repeat;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">background-attachment: fixed;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">background-position: center;\u00a0<\/span>\r\n\r\n<span style=\"font-weight: 400;\">}<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;\/style&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;\/head&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;body&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;h1&gt;V\u00ed d\u1ee5 v\u1ec1 background CSS&lt;\/h1&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;p&gt;Trong v\u00ed d\u1ee5 n\u00e0y, ITviec \u0111\u00e3 thi\u1ebft l\u1eadp c\u00e1c thu\u1ed9c t\u00ednh sau:&lt;\/p&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;p&gt;background-color: lightblue;&lt;\/p&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;p&gt;background-image: url(\"img_tree.gif\");&lt;\/p&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;p&gt;background-repeat: no-repeat;&lt;\/p&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;p&gt;background-attachment: fixed;&lt;\/p&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;p&gt;background-position: center;&lt;\/p&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;\/body&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;\/html&gt;\r\n<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">B\u1ea1n c\u0169ng c\u00f3 th\u1ec3 vi\u1ebft ng\u1eafn g\u1ecdn c\u00e1c c\u00e2u l\u1ec7nh thi\u1ebft l\u1eadp thu\u1ed9c t\u00ednh background trong v\u00ed d\u1ee5 th\u00e0nh: <\/span><\/p>\n<pre>background: lightblue url(\"img_tree.gif\") no-repeat fixed center;<\/pre>\n<p><span style=\"font-weight: 400;\"><strong>L\u01b0u \u00fd:<\/strong> H\u00ecnh \u1ea3nh img_tree.gif c\u1ea7n ph\u1ea3i t\u1ed3n t\u1ea1i trong \u0111\u01b0\u1eddng d\u1eabn \u0111\u01b0\u1ee3c ch\u1ec9 \u0111\u1ecbnh. N\u1ebfu kh\u00f4ng, h\u00ecnh \u1ea3nh s\u1ebd kh\u00f4ng hi\u1ec3n th\u1ecb.<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Vai_tro_cua_background_CSS_trong_thiet_ke_website\"><\/span><b>Vai tr\u00f2 c\u1ee7a background CSS trong thi\u1ebft k\u1ebf website<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li><b>T\u0103ng t\u00ednh th\u1ea9m m\u1ef9: <\/b><span style=\"font-weight: 400;\">S\u1eed d\u1ee5ng h\u00ecnh \u1ea3nh l\u00e0m n\u1ec1n gi\u00fap t\u1ea1o \u0111i\u1ec3m nh\u1ea5n cho c\u00e1c ph\u1ea7n t\u1eed, thu h\u00fat s\u1ef1 ch\u00fa \u00fd c\u1ee7a ng\u01b0\u1eddi d\u00f9ng v\u00e0 khi\u1ebfn giao di\u1ec7n trang web tr\u1edf n\u00ean sinh \u0111\u1ed9ng, b\u1eaft m\u1eaft h\u01a1n.\u00a0<\/span><\/li>\n<li><b>T\u1ea1o s\u1ef1 c\u00e2n \u0111\u1ed1i cho b\u1ed1 c\u1ee5c: <\/b><span style=\"font-weight: 400;\">Khi s\u1eed d\u1ee5ng thu\u1ed9c t\u00ednh CSS float \u0111\u1ec3 \u0111\u1ecbnh v\u1ecb c\u00e1c th\u00e0nh ph\u1ea7n b\u1ed1 c\u1ee5c, \u0111\u1ed9 d\u00e0i c\u1ee7a c\u00e1c c\u1ed9t tr\u00ean trang web c\u00f3 th\u1ec3 ng\u1eafn ho\u1eb7c d\u00e0i h\u01a1n so v\u1edbi nhau. Khi n\u00e0y, n\u1ec1n c\u1ee7a c\u00e1c c\u1ed9t s\u1ebd tr\u1ed3i s\u1ee5t m\u1ea5t c\u00e2n x\u1ee9ng, khi\u1ebfn b\u1ed1 c\u1ee5c tr\u00f4ng l\u1ed9n x\u1ed9n, thi\u1ebfu chuy\u00ean nghi\u1ec7p. B\u1eb1ng thu\u1ed9c t\u00ednh background CSS, b\u1ea1n c\u00f3 th\u1ec3 \u00e1p d\u1ee5ng m\u1ed9t background cho t\u1ea5t c\u1ea3 c\u00e1c c\u1ed9t, thay v\u00ec \u00e1p d\u1ee5ng m\u1ed7i background cho m\u1ed9t c\u1ed9t. T\u1eeb \u0111\u00f3 c\u00f3 th\u1ec3 c\u00e2n \u0111\u1ed1i b\u1ed1 c\u1ee5c ngay c\u1ea3 khi \u0111i\u1ec1u ch\u1ec9nh nhi\u1ec1u l\u1ea7n.<\/span><\/li>\n<li><b>C\u1ea3i thi\u1ec7n kh\u1ea3 n\u0103ng truy c\u1eadp: <\/b><span style=\"font-weight: 400;\">V\u1edbi thu\u1ed9c t\u00ednh background-image, b\u1ea1n c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng h\u00ecnh \u1ea3nh ch\u1ee9a v\u0103n b\u1ea3n thay th\u1ebf cho v\u0103n b\u1ea3n thu\u1ea7n tu\u00fd tr\u00ean trang. B\u1eb1ng c\u00e1ch n\u00e0y, v\u0103n b\u1ea3n c\u00f3 th\u1ec3 \u0111\u01b0\u1ee3c hi\u1ec3n th\u1ecb r\u00f5 n\u00e9t v\u00e0 ch\u00ednh x\u00e1c v\u1edbi nh\u1eefng ng\u01b0\u1eddi d\u00f9ng kh\u00f4ng c\u00f3 font ch\u1eef th\u00edch h\u1ee3p, \u0111\u1ea3m b\u1ea3o n\u1ed9i dung \u0111\u01b0\u1ee3c truy\u1ec1n t\u1ea3i \u0111\u1ea7y \u0111\u1ee7.<\/span><\/li>\n<li><b>T\u0103ng t\u00ednh linh ho\u1ea1t: <\/b><span style=\"font-weight: 400;\">Thay v\u00ec s\u1eed d\u1ee5ng nhi\u1ec1u th\u1ebb HTML \u0111\u1ec3 t\u1ea1o b\u1ed1 c\u1ee5c, ta c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng background image \u0111\u1ec3 t\u1ea1o c\u00e1c hi\u1ec7u \u1ee9ng ph\u1ee9c t\u1ea1p m\u1ed9t c\u00e1ch d\u1ec5 d\u00e0ng v\u00e0 hi\u1ec7u qu\u1ea3 h\u01a1n. Vi\u1ec7c s\u1eed d\u1ee5ng background image gi\u00fap gi\u1ea3m thi\u1ec3u m\u00e3 code, khi\u1ebfn trang web tr\u1edf n\u00ean g\u1ecdn nh\u1eb9 v\u00e0 d\u1ec5 b\u1ea3o tr\u00ec h\u01a1n.<\/span><\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Huong_dan_cach_dung_8_thuoc_tinh_background_CSS\"><\/span><b>H\u01b0\u1edbng d\u1eabn c\u00e1ch d\u00f9ng 8 thu\u1ed9c t\u00ednh background CSS<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><b>background-color<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Thu\u1ed9c t\u00ednh background-color gi\u00fap thi\u1ebft l\u1eadp m\u00e0u n\u1ec1n c\u1ee7a m\u1ed9t ph\u1ea7n t\u1eed, bao g\u1ed3m ph\u1ea7n \u0111\u1ec7m (padding) v\u00e0 \u0111\u01b0\u1eddng vi\u1ec1n (border), kh\u00f4ng t\u00ednh l\u1ec1 (margin). <\/span><\/p>\n<p><span style=\"font-weight: 400;\">C\u00fa ph\u00e1p c\u1ee7a thu\u1ed9c t\u00ednh background-color:<\/span><\/p>\n<pre><b>background-color: color | transparent | initial | inherit;<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">Trong \u0111\u00f3, c\u00e1c gi\u00e1 tr\u1ecb c\u00f3 \u00fd ngh\u0129a nh\u01b0 sau:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td style=\"text-align: left;\" colspan=\"2\"><b>Gi\u00e1 tr\u1ecb<\/b><\/td>\n<td style=\"text-align: left;\"><b>M\u00f4 t\u1ea3<\/b><\/td>\n<td style=\"text-align: left;\"><b>V\u00ed d\u1ee5<\/b><\/td>\n<td style=\"text-align: left;\">\u00a0<strong>H\u00ecnh minh h\u1ecda<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\" rowspan=\"6\"><b>color<\/b><\/td>\n<td style=\"text-align: left;\"><b>color name<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp thu\u1ed9c t\u00ednh background-color b\u1eb1ng t\u00ean m\u00e0u s\u1eafc.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-color: yellow;<\/span><\/td>\n<td style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-74487 size-large\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-name-vippro-640x415.jpg\" alt=\"\" width=\"640\" height=\"415\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-name-vippro-694x450.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-name-vippro-300x195.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-name-vippro-200x130.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-name-vippro-100x65.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-name-vippro.jpg 1440w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>HEX code<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp thu\u1ed9c t\u00ednh background-color b\u1eb1ng m\u00e3 m\u00e0u HEX.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-color: #FFC0CB;<\/span><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-74486 size-large alignleft\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-hex-vippro-640x411.jpg\" alt=\"\" width=\"640\" height=\"411\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-hex-vippro-700x450.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-hex-vippro-300x193.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-hex-vippro-200x128.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-hex-vippro-100x64.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-hex-vippro.jpg 1432w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>Gi\u00e1 tr\u1ecb RGB<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp thu\u1ed9c t\u00ednh background-color b\u1eb1ng gi\u00e1 tr\u1ecb m\u00e0u s\u1eafc RGB.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-color: rgb(255, 105, 180);<\/span><\/td>\n<td style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-74485\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-RGB-vippro-640x411.jpg\" alt=\"\" width=\"640\" height=\"411\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-RGB-vippro-700x450.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-RGB-vippro-300x193.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-RGB-vippro-200x128.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-RGB-vippro-100x64.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-RGB-vippro.jpg 1432w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>Gi\u00e1 tr\u1ecb RGBA<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp thu\u1ed9c t\u00ednh background-color b\u1eb1ng gi\u00e1 tr\u1ecb RGBA.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-color: rgba(0, 0, 255, 0.5);<\/span><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-74484 alignleft\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-RGBA-vippro-640x450.jpg\" alt=\"\" width=\"640\" height=\"450\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-RGBA-vippro-641x450.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-RGBA-vippro-300x211.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-RGBA-vippro-200x141.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-RGBA-vippro-100x70.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-RGBA-vippro.jpg 1432w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>Gi\u00e1 tr\u1ecb HSL<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp thu\u1ed9c t\u00ednh background-color b\u1eb1ng gi\u00e1 tr\u1ecb HSL.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-color: hsl(120, 100%, 50%);<\/span><\/td>\n<td style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-74483\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-HSL-vippro-640x259.jpg\" alt=\"\" width=\"640\" height=\"259\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-HSL-vippro-700x284.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-HSL-vippro-300x122.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-HSL-vippro-200x81.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-HSL-vippro-100x41.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-HSL-vippro.jpg 1436w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>Gi\u00e1 tr\u1ecb HSLA<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp thu\u1ed9c t\u00ednh background-color b\u1eb1ng gi\u00e1 tr\u1ecb HSLA.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-color: hsla(0, 100%, 50%, 1.0);<\/span><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-74489 alignleft\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-HSLA-vippro-640x257.jpg\" alt=\"\" width=\"640\" height=\"257\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-HSLA-vippro-700x282.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-HSLA-vippro-300x121.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-HSLA-vippro-200x80.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-HSLA-vippro-100x40.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-HSLA-vippro.jpg 1432w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\" colspan=\"2\"><b>transparent<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Gi\u00e1 tr\u1ecb m\u1eb7c \u0111\u1ecbnh c\u1ee7a thu\u1ed9c t\u00ednh background-color. V\u1edbi gi\u00e1 tr\u1ecb n\u00e0y, background s\u1ebd c\u00f3 m\u00e0u trong su\u1ed1t.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-color: transparent;<\/span><\/td>\n<td style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-74482\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-transparent-vippro-640x442.jpg\" alt=\"\" width=\"640\" height=\"442\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-transparent-vippro-652x450.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-transparent-vippro-300x207.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-transparent-vippro-200x138.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-transparent-vippro-100x69.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-transparent-vippro.jpg 1442w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\" colspan=\"2\"><b>initial<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp thu\u1ed9c t\u00ednh v\u1ec1 gi\u00e1 tr\u1ecb m\u1eb7c \u0111\u1ecbnh.<\/span><\/td>\n<td style=\"text-align: left;\"><\/td>\n<td style=\"text-align: left;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\" colspan=\"2\"><b>inherit<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp thu\u1ed9c t\u00ednh v\u1edbi gi\u00e1 tr\u1ecb c\u1ee7a ph\u1ea7n t\u1eed cha.<\/span><\/td>\n<td style=\"text-align: left;\"><\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><b>L\u01b0u \u00fd:<\/b> <span style=\"font-weight: 400;\">Thu\u1ed9c t\u00ednh background-color ch\u1ec9 \u00e1p d\u1ee5ng cho ph\u1ea7n t\u1eed HTML, kh\u00f4ng \u1ea3nh h\u01b0\u1edfng \u0111\u1ebfn n\u1ed9i dung b\u00ean trong nh\u01b0 v\u0103n b\u1ea3n, h\u00ecnh \u1ea3nh.<\/span><\/p>\n<blockquote><p><em>\u0110\u1ecdc th\u00eam: <a href=\"https:\/\/itviec.com\/blog\/bang-mau-html\/\" target=\"_blank\" rel=\"noopener\"><strong>T\u1ed5ng h\u1ee3p chi ti\u1ebft v\u00e0 \u0111\u1ea7y \u0111\u1ee7 nh\u1ea5t v\u1ec1 B\u1ea3ng m\u00e0u HTML<\/strong><\/a><\/em><\/p><\/blockquote>\n<h3><b>background-image<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Thu\u1ed9c t\u00ednh background-image \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 thi\u1ebft l\u1eadp m\u1ed9t ho\u1eb7c nhi\u1ec1u background cho m\u1ed9t ph\u1ea7n t\u1eed. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">C\u00fa ph\u00e1p nh\u01b0 sau:<\/span><\/p>\n<pre><b>background-image: url('url') | none | initial | inherit;<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">Trong \u0111\u00f3, c\u00e1c gi\u00e1 tr\u1ecb c\u00f3 \u00fd ngh\u0129a nh\u01b0 b\u1ea3ng b\u00ean d\u01b0\u1edbi:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<p style=\"text-align: left;\"><b>Gi\u00e1 tr\u1ecb<\/b><\/p>\n<\/td>\n<td style=\"text-align: left;\"><b>M\u00f4 t\u1ea3<\/b><\/td>\n<td style=\"text-align: left;\"><b>V\u00ed d\u1ee5<\/b><\/td>\n<td style=\"text-align: left;\"><strong>H\u00ecnh minh h\u1ecda<\/strong><\/td>\n<\/tr>\n<tr>\n<td>\n<p style=\"text-align: left;\"><b>url(\u2018url\u2019)<\/b><\/p>\n<\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">URL \u0111\u1ebfn h\u00ecnh \u1ea3nh. \u0110\u1ec3 thi\u1ebft l\u1eadp nhi\u1ec1u h\u00ecnh \u1ea3nh, h\u00e3y ph\u00e2n c\u00e1ch c\u00e1c URL b\u1eb1ng d\u1ea5u ph\u1ea9y.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-image: url(&#8220;img_tree.gif&#8221;), url(&#8220;paper.gif&#8221;);<\/span><\/td>\n<td style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-74496\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-url-vippro-640x256.jpg\" alt=\"\" width=\"640\" height=\"256\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-url-vippro-700x280.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-url-vippro-300x120.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-url-vippro-200x80.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-url-vippro-100x40.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-url-vippro.jpg 1434w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>none<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">\u0110\u00e2y l\u00e0 tr\u01b0\u1eddng h\u1ee3p m\u1eb7c \u0111\u1ecbnh. Khi n\u00e0y, background s\u1ebd kh\u00f4ng hi\u1ec3n th\u1ecb h\u00ecnh \u1ea3nh.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-image: none;<\/span><\/td>\n<td style=\"text-align: left;\"><\/td>\n<\/tr>\n<tr>\n<td>\n<p style=\"text-align: left;\"><b>conic-gradient()<\/b><\/p>\n<\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp hi\u1ec7u \u1ee9ng chuy\u1ec3n m\u00e0u theo h\u00ecnh n\u00f3n l\u00e0m background. C\u1ea7n x\u00e1c \u0111\u1ecbnh \u00edt nh\u1ea5t 2 m\u00e0u s\u1eafc \u0111\u1ec3 s\u1eed d\u1ee5ng gi\u00e1 tr\u1ecb n\u00e0y.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-image: conic-gradient(red, yellow, green);<\/span><\/td>\n<td style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-74500\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-conic-vippro-640x248.jpg\" alt=\"\" width=\"640\" height=\"248\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-conic-vippro-700x271.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-conic-vippro-300x116.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-conic-vippro-200x78.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-conic-vippro-100x39.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-conic-vippro.jpg 1444w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>linear-gradient()<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp hi\u1ec7u \u1ee9ng chuy\u1ec3n m\u00e0u theo tuy\u1ebfn t\u00ednh (theo \u0111\u01b0\u1eddng th\u1eb3ng) l\u00e0m background. C\u1ea7n x\u00e1c \u0111\u1ecbnh \u00edt nh\u1ea5t hai m\u00e0u s\u1eafc (top to bottom &#8211; t\u1eeb tr\u00ean xu\u1ed1ng d\u01b0\u1edbi) \u0111\u1ec3 s\u1eed d\u1ee5ng gi\u00e1 tr\u1ecb n\u00e0y.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-image: linear-gradient(red, yellow, blue);<\/span><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-74494 alignleft\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-linear-vippro-640x250.jpg\" alt=\"\" width=\"640\" height=\"250\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-linear-vippro-700x274.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-linear-vippro-300x117.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-linear-vippro-200x78.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-linear-vippro-100x39.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-linear-vippro.jpg 1448w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td>\n<p style=\"text-align: left;\"><b>radial-gradient()<\/b><\/p>\n<\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp hi\u1ec7u \u1ee9ng chuy\u1ec3n m\u00e0u t\u1ecfa tr\u00f2n l\u00e0m background. C\u1ea7n x\u00e1c \u0111\u1ecbnh \u00edt nh\u1ea5t hai m\u00e0u (center to edges &#8211; t\u1eeb gi\u1eefa \u0111\u1ebfn c\u1ea1nh) \u0111\u1ec3 s\u1eed d\u1ee5ng gi\u00e1 tr\u1ecb n\u00e0y.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-image: radial-gradient(red, green, blue);<\/span><\/td>\n<td style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-74499\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-radial-vippro-640x239.jpg\" alt=\"\" width=\"640\" height=\"239\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-radial-vippro-700x262.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-radial-vippro-300x112.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-radial-vippro-200x75.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-radial-vippro-100x37.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-radial-vippro.jpg 1440w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>repeating-conic-gradient()<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">L\u1eb7p l\u1ea1i gi\u00e1 tr\u1ecb conic-gradient().<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-image: repeating-conic-gradient(red 10%, yellow 20%);<\/span><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-74503 alignleft\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-gradient-vippro-640x244.jpg\" alt=\"\" width=\"640\" height=\"244\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-gradient-vippro-700x267.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-gradient-vippro-300x114.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-gradient-vippro-200x76.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-gradient-vippro-100x38.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-gradient-vippro.jpg 1442w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td>\n<p style=\"text-align: left;\"><b>repeating-linear-gradient()<\/b><\/p>\n<\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">L\u1eb7p l\u1ea1i gi\u00e1 tr\u1ecb linear-gradient().<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-image: repeating-linear-gradient(red, yellow 10%, green 20%);<\/span><\/td>\n<td style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-74502\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-linear-vippro-640x247.png\" alt=\"\" width=\"640\" height=\"247\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-linear-vippro-700x270.png 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-linear-vippro-300x116.png 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-linear-vippro-200x77.png 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-linear-vippro-100x39.png 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-linear-vippro.png 1438w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>repeating-radial-gradient()<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">L\u1eb7p l\u1ea1i gi\u00e1 tr\u1ecb radial-gradient().<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-image: repeating-radial-gradient(red, yellow 10%, green 15%);<\/span><\/td>\n<td style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-74501\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-radial-vippro-640x241.jpg\" alt=\"\" width=\"640\" height=\"241\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-radial-vippro-700x264.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-radial-vippro-300x113.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-radial-vippro-200x75.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-radial-vippro-100x38.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-radial-vippro.jpg 1444w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td>\n<p style=\"text-align: left;\"><b>initial<\/b><\/p>\n<\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp thu\u1ed9c t\u00ednh v\u1ec1 gi\u00e1 tr\u1ecb m\u1eb7c \u0111\u1ecbnh.<\/span><\/td>\n<td style=\"text-align: left;\"><\/td>\n<td style=\"text-align: left;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>inherit<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">K\u1ebf th\u1eeba thu\u1ed9c t\u00ednh t\u1eeb ph\u1ea7n t\u1eed cha.<\/span><\/td>\n<td style=\"text-align: left;\"><\/td>\n<td style=\"text-align: left;\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<blockquote><p><em>\u0110\u1ecdc th\u00eam: <a href=\"https:\/\/itviec.com\/blog\/chen-anh-trong-html\/\" target=\"_blank\" rel=\"noopener\"><strong>Ch\u00e8n \u1ea3nh trong HTML: T\u1ed5ng h\u1ee3p chi ti\u1ebft c\u00e1c c\u00e1ch s\u1eed d\u1ee5ng<\/strong><\/a><\/em><\/p><\/blockquote>\n<h3><b>background-repeat<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Thu\u1ed9c t\u00ednh background-repeat thi\u1ebft l\u1eadp c\u00e1ch l\u1eb7p l\u1ea1i background c\u1ee7a ph\u1ea7n t\u1eed. Thu\u1ed9c t\u00ednh n\u00e0y ch\u1ec9 ho\u1ea1t \u0111\u1ed9ng khi thu\u1ed9c t\u00ednh background-image \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 \u0111\u1eb7t h\u00ecnh \u1ea3nh ho\u1eb7c pattern cho background. Background c\u00f3 th\u1ec3 \u0111\u01b0\u1ee3c l\u1eb7p l\u1ea1i theo tr\u1ee5c ngang, tr\u1ee5c d\u1ecdc ho\u1eb7c kh\u00f4ng l\u1eb7p l\u1ea1i. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">C\u00fa ph\u00e1p nh\u01b0 sau:<\/span><\/p>\n<pre><b>background-repeat: repeat | repeat-x | round | space | repeat-y | no-repeat | initial | inherit;<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">Trong \u0111\u00f3, c\u00e1c gi\u00e1 tr\u1ecb c\u00f3 \u00fd ngh\u0129a nh\u01b0 b\u1ea3ng b\u00ean d\u01b0\u1edbi \u0111\u00e2y:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<p style=\"text-align: left;\"><b>Gi\u00e1 tr\u1ecb<\/b><\/p>\n<\/td>\n<td style=\"text-align: left;\"><b>M\u00f4 t\u1ea3<\/b><\/td>\n<td style=\"text-align: left;\"><b>V\u00ed d\u1ee5<\/b><\/td>\n<td style=\"text-align: left;\"><strong>H\u00ecnh minh h\u1ecda<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>repeat<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">\u0110\u00e2y l\u00e0 gi\u00e1 tr\u1ecb m\u1eb7c \u0111\u1ecbnh. H\u00ecnh \u1ea3nh s\u1ebd \u0111\u01b0\u1ee3c l\u1eb7p l\u1ea1i theo c\u1ea3 chi\u1ec1u d\u1ecdc v\u00e0 chi\u1ec1u ngang. H\u00ecnh \u1ea3nh cu\u1ed1i c\u00f9ng s\u1ebd b\u1ecb c\u1eaft b\u1edbt n\u1ebfu v\u01b0\u1ee3t qu\u00e1 k\u00edch th\u01b0\u1edbc background.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-repeat: repeat;<\/span><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-74555 size-large\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-vippro-1-640x520.jpg\" alt=\"background css - itviec blog\" width=\"640\" height=\"520\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-vippro-1.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-vippro-1-300x244.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-vippro-1-200x162.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-vippro-1-100x81.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-vippro-1-554x450.jpg 554w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td>\n<p style=\"text-align: left;\"><b>repeat-x<\/b><\/p>\n<\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">H\u00ecnh \u1ea3nh \u0111\u01b0\u1ee3c l\u1eb7p l\u1ea1i theo chi\u1ec1u ngang c\u1ee7a background.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-repeat: repeat-x;<\/span><\/td>\n<td style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-74554 size-large\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-x-vippro-1-640x518.jpg\" alt=\"background css - itviec blog\" width=\"640\" height=\"518\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-x-vippro-1.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-x-vippro-1-300x243.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-x-vippro-1-200x162.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-x-vippro-1-100x81.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-x-vippro-1-556x450.jpg 556w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>repeat-y<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">H\u00ecnh \u1ea3nh \u0111\u01b0\u1ee3c l\u1eb7p l\u1ea1i theo chi\u1ec1u d\u1ecdc c\u1ee7a background.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-repeat: repeat-y;<\/span><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-74553 size-large\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-y-vippro-1-640x518.jpg\" alt=\"background css - itviec blog\" width=\"640\" height=\"518\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-y-vippro-1.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-y-vippro-1-300x243.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-y-vippro-1-200x162.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-y-vippro-1-100x81.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-y-vippro-1-556x450.jpg 556w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td>\n<p style=\"text-align: left;\"><b>no-repeat<\/b><\/p>\n<\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">H\u00ecnh \u1ea3nh kh\u00f4ng \u0111\u01b0\u1ee3c l\u1eb7p l\u1ea1i m\u00e0 ch\u1ec9 hi\u1ec3n th\u1ecb m\u1ed9t l\u1ea7n.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-repeat: no-repeat;<\/span><\/td>\n<td style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-74552 size-large\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-no-repeat-vippro-1-640x519.jpg\" alt=\"background css - itviec blog\" width=\"640\" height=\"519\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-no-repeat-vippro-1.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-no-repeat-vippro-1-300x243.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-no-repeat-vippro-1-200x162.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-no-repeat-vippro-1-100x81.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-no-repeat-vippro-1-555x450.jpg 555w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>space<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">H\u00ecnh \u1ea3nh \u0111\u01b0\u1ee3c l\u1eb7p l\u1ea1i nhi\u1ec1u nh\u1ea5t c\u00f3 th\u1ec3 m\u00e0 kh\u00f4ng b\u1ecb c\u1eaft b\u1edbt. H\u00ecnh \u1ea3nh \u0111\u1ea7u ti\u00ean v\u00e0 cu\u1ed1i c\u00f9ng \u0111\u01b0\u1ee3c ghim v\u00e0o hai b\u00ean c\u1ee7a ph\u1ea7n t\u1eed v\u00e0 kho\u1ea3ng tr\u1eafng \u0111\u01b0\u1ee3c ph\u00e2n b\u1ed5 \u0111\u1ec1u gi\u1eefa c\u00e1c h\u00ecnh \u1ea3nh.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-repeat: space;<\/span><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-74551 size-large\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-space-vippro-1-640x519.jpg\" alt=\"background css - itviec blog\" width=\"640\" height=\"519\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-space-vippro-1.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-space-vippro-1-300x243.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-space-vippro-1-200x162.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-space-vippro-1-100x81.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-space-vippro-1-555x450.jpg 555w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td>\n<p style=\"text-align: left;\"><b>round<\/b><\/p>\n<\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">H\u00ecnh \u1ea3nh \u0111\u01b0\u1ee3c l\u1eb7p l\u1ea1i v\u00e0 b\u1ecb \u00e9p ho\u1eb7c k\u00e9o d\u00e0i \u0111\u1ec3 l\u1ea5p \u0111\u1ea7y kho\u1ea3ng tr\u1ed1ng c\u1ee7a background.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-repeat: round;<\/span><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-74550 size-large\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-round-vippro-640x520.png\" alt=\"background css - itviec blog\" width=\"640\" height=\"520\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-round-vippro-640x520.png 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-round-vippro-300x244.png 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-round-vippro-200x162.png 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-round-vippro-768x624.png 768w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-round-vippro-100x81.png 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-round-vippro-554x450.png 554w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-repeat-round-vippro.png 1438w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td>\n<p style=\"text-align: left;\"><b>initial<\/b><\/p>\n<\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp thu\u1ed9c t\u00ednh v\u1ec1 gi\u00e1 tr\u1ecb m\u1eb7c \u0111\u1ecbnh.<\/span><\/td>\n<td style=\"text-align: left;\"><\/td>\n<td style=\"text-align: left;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>inherit<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">K\u1ebf th\u1eeba thu\u1ed9c t\u00ednh t\u1eeb ph\u1ea7n t\u1eed cha.<\/span><\/td>\n<td style=\"text-align: left;\"><\/td>\n<td style=\"text-align: left;\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3><b>background-attachment<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Thu\u1ed9c t\u00ednh background-attachment x\u00e1c \u0111\u1ecbnh c\u00e1ch th\u1ee9c hi\u1ec3n th\u1ecb background c\u1ee7a m\u1ed9t ph\u1ea7n t\u1eed HTML khi ng\u01b0\u1eddi d\u00f9ng cu\u1ed9n trang. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">C\u00fa ph\u00e1p nh\u01b0 sau:<\/span><\/p>\n<pre><b>background-attachment: scroll | fixed | local | initial | inherit;<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">Thu\u1ed9c t\u00ednh background-attachment c\u00f3 th\u1ec3 nh\u1eadn nhi\u1ec1u gi\u00e1 tr\u1ecb kh\u00e1c nhau, bao g\u1ed3m:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><b>Gi\u00e1 tr\u1ecb<\/b><\/td>\n<td style=\"text-align: left;\"><b>M\u00f4 t\u1ea3<\/b><\/td>\n<td style=\"text-align: left;\"><b>C\u00fa ph\u00e1p<\/b><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>scroll<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">\u0110\u00e2y l\u00e0 gi\u00e1 tr\u1ecb m\u1eb7c \u0111\u1ecbnh. Background s\u1ebd di chuy\u1ec3n c\u00f9ng v\u1edbi khung nh\u00ecn khi ng\u01b0\u1eddi d\u00f9ng cu\u1ed9n trang.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-attachment: scroll;<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>fixed<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Background s\u1ebd c\u1ed1 \u0111\u1ecbnh v\u00e0o khung nh\u00ecn v\u00e0 kh\u00f4ng di chuy\u1ec3n khi ng\u01b0\u1eddi d\u00f9ng cu\u1ed9n trang.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-attachment: fixed;<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>local<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Background s\u1ebd di chuy\u1ec3n c\u00f9ng v\u1edbi n\u1ed9i dung c\u1ee7a ph\u1ea7n t\u1eed ch\u1ee9a n\u00f3.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-attachment: local;<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>initial<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp thu\u1ed9c t\u00ednh v\u1ec1 gi\u00e1 tr\u1ecb m\u1eb7c \u0111\u1ecbnh.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-attachment: initial;<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>inherit<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">K\u1ebf th\u1eeba thu\u1ed9c t\u00ednh t\u1eeb ph\u1ea7n t\u1eed cha.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-attachment: inherit;<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><b>L\u01b0u \u00fd:<\/b> <span style=\"font-weight: 400;\">Thu\u1ed9c t\u00ednh background-attachment ch\u1ec9 ho\u1ea1t \u0111\u1ed9ng v\u1edbi background-image ch\u1ee9 kh\u00f4ng \u1ea3nh h\u01b0\u1edfng \u0111\u1ebfn background-color.<\/span><\/p>\n<h3><b>background-position<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Thu\u1ed9c t\u00ednh background-position trong CSS \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 x\u00e1c \u0111\u1ecbnh v\u1ecb tr\u00ed c\u1ee7a background cho m\u1ed9t ph\u1ea7n t\u1eed HTML. N\u00f3 ho\u1ea1t \u0111\u1ed9ng c\u00f9ng v\u1edbi c\u00e1c thu\u1ed9c t\u00ednh background-image v\u00e0 background-repeat \u0111\u1ec3 ki\u1ec3m so\u00e1t c\u00e1ch hi\u1ec3n th\u1ecb background tr\u00ean trang web. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">C\u00fa ph\u00e1p nh\u01b0 sau:<\/span><\/p>\n<pre><b>background-position: value;<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">Thu\u1ed9c t\u00ednh background-position c\u00f3 th\u1ec3 nh\u1eadn nhi\u1ec1u gi\u00e1 tr\u1ecb kh\u00e1c nhau, bao g\u1ed3m:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<p style=\"text-align: left;\"><b>Gi\u00e1 tr\u1ecb<\/b><\/p>\n<\/td>\n<td style=\"text-align: left;\"><b>M\u00f4 t\u1ea3<\/b><\/td>\n<td style=\"text-align: left;\"><b>V\u00ed d\u1ee5<\/b><\/td>\n<td style=\"text-align: left;\"><strong>H\u00ecnh minh h\u1ecda<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>left top<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">V\u1ecb tr\u00ed m\u1eb7c \u0111\u1ecbnh, thi\u1ebft l\u1eadp h\u00ecnh \u1ea3nh \u1edf ph\u00eda tr\u00ean c\u00f9ng b\u00ean tr\u00e1i c\u1ee7a ph\u1ea7n t\u1eed.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-position: left top;<\/span><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-74525 size-large\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-left-top-vippro-640x517.jpg\" alt=\"background css - itviec blog\" width=\"640\" height=\"517\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-left-top-vippro-768x621.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-left-top-vippro-300x242.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-left-top-vippro-200x162.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-left-top-vippro-100x81.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-left-top-vippro-557x450.jpg 557w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-left-top-vippro.jpg 1438w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td>\n<p style=\"text-align: left;\"><b>left center<\/b><\/p>\n<\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp h\u00ecnh \u1ea3nh \u1edf ch\u00ednh gi\u1eefa b\u00ean tr\u00e1i c\u1ee7a ph\u1ea7n t\u1eed.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-position: left center;<\/span><\/td>\n<td style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-74524 size-large\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-left-center-vippro-640x519.jpg\" alt=\"background css - itviec blog\" width=\"640\" height=\"519\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-left-center-vippro-768x623.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-left-center-vippro-300x243.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-left-center-vippro-200x162.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-left-center-vippro-100x81.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-left-center-vippro-555x450.jpg 555w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-left-center-vippro.jpg 1438w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>left bottom<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp h\u00ecnh \u1ea3nh \u1edf ph\u00eda d\u01b0\u1edbi b\u00ean tr\u00e1i.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-position: left bottom;<\/span><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-74523 size-large\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-left-bottom-vippro-640x520.jpg\" alt=\"background css - itviec blog\" width=\"640\" height=\"520\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-left-bottom-vippro-768x624.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-left-bottom-vippro-300x244.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-left-bottom-vippro-200x162.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-left-bottom-vippro-100x81.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-left-bottom-vippro-554x450.jpg 554w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-left-bottom-vippro.jpg 1436w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td>\n<p style=\"text-align: left;\"><b>center top<\/b><\/p>\n<\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp h\u00ecnh \u1ea3nh \u1edf v\u1ecb tr\u00ed tr\u00ean c\u00f9ng ch\u00ednh gi\u1eefa.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-position: center top;<\/span><\/td>\n<td style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-74522 size-large\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-center-top-vippro-640x519.jpg\" alt=\"background css - itviec blog\" width=\"640\" height=\"519\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-center-top-vippro-768x623.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-center-top-vippro-300x243.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-center-top-vippro-200x162.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-center-top-vippro-100x81.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-center-top-vippro-555x450.jpg 555w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-center-top-vippro.jpg 1438w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>center center<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp h\u00ecnh \u1ea3nh \u1edf v\u1ecb tr\u00ed trung t\u00e2m.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-position: center center;<\/span><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-74521 size-large\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-center-center-vippro-640x520.jpg\" alt=\"background css - itviec blog\" width=\"640\" height=\"520\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-center-center-vippro-768x624.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-center-center-vippro-300x244.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-center-center-vippro-200x162.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-center-center-vippro-100x81.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-center-center-vippro-554x450.jpg 554w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-center-center-vippro.jpg 1438w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td>\n<p style=\"text-align: left;\"><b>center bottom<\/b><\/p>\n<\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp h\u00ecnh \u1ea3nh \u1edf v\u1ecb tr\u00ed d\u01b0\u1edbi c\u00f9ng ch\u00ednh gi\u1eefa.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-position: center bottom;<\/span><\/td>\n<td style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-74520 size-large\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-center-bottom-vippro-640x518.jpg\" alt=\"background css - itviec blog\" width=\"640\" height=\"518\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-center-bottom-vippro-768x622.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-center-bottom-vippro-300x243.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-center-bottom-vippro-200x162.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-center-bottom-vippro-100x81.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-center-bottom-vippro-556x450.jpg 556w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-center-bottom-vippro.jpg 1438w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>right top<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp h\u00ecnh \u1ea3nh \u1edf v\u1ecb tr\u00ed tr\u00ean c\u00f9ng b\u00ean ph\u1ea3i.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-position: right top;<\/span><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-74517 size-large\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-right-top-vippro-640x516.jpg\" alt=\"background css - itviec blog\" width=\"640\" height=\"516\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-right-top-vippro-768x620.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-right-top-vippro-300x242.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-right-top-vippro-200x161.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-right-top-vippro-100x81.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-right-top-vippro-558x450.jpg 558w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-right-top-vippro.jpg 1438w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td>\n<p style=\"text-align: left;\"><b>right center<\/b><\/p>\n<\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp h\u00ecnh \u1ea3nh \u1edf v\u1ecb tr\u00ed ch\u00ednh gi\u1eefa b\u00ean ph\u1ea3i.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-position: right center;<\/span><\/td>\n<td style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-74518 size-large\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-right-center-vippro-640x519.jpg\" alt=\"background css - itviec blog\" width=\"640\" height=\"519\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-right-center-vippro-768x623.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-right-center-vippro-300x243.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-right-center-vippro-200x162.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-right-center-vippro-100x81.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-right-center-vippro-555x450.jpg 555w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-right-center-vippro.jpg 1440w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>right bottom<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp h\u00ecnh \u1ea3nh \u1edf v\u1ecb tr\u00ed d\u01b0\u1edbi c\u00f9ng b\u00ean ph\u1ea3i.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-position: right bottom;<\/span><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-74519 size-large\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-right-bottom-vippro-640x518.jpg\" alt=\"background css - itviec blog\" width=\"640\" height=\"518\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-right-bottom-vippro-768x622.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-right-bottom-vippro-300x243.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-right-bottom-vippro-200x162.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-right-bottom-vippro-100x81.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-right-bottom-vippro-556x450.jpg 556w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-right-bottom-vippro.jpg 1438w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td>\n<p style=\"text-align: left;\"><b>x% y%<\/b><\/p>\n<\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Gi\u00e1 tr\u1ecb \u0111\u1ea7u ti\u00ean x\u00e1c \u0111\u1ecbnh v\u1ecb tr\u00ed theo chi\u1ec1u ngang, gi\u00e1 tr\u1ecb th\u1ee9 hai x\u00e1c \u0111\u1ecbnh v\u1ecb tr\u00ed theo chi\u1ec1u d\u1ecdc.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">G\u00f3c tr\u00ean c\u00f9ng b\u00ean tr\u00e1i l\u00e0 0% 0%, \u0111\u00e2y c\u0169ng l\u00e0 gi\u00e1 tr\u1ecb m\u1eb7c \u0111\u1ecbnh. G\u00f3c d\u01b0\u1edbi c\u00f9ng b\u00ean ph\u1ea3i l\u00e0 100% 100%.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">N\u1ebfu b\u1ea1n ch\u1ec9 \u0111\u1ecbnh m\u1ed9t gi\u00e1 tr\u1ecb, gi\u00e1 tr\u1ecb c\u00f2n l\u1ea1i m\u1eb7c \u0111\u1ecbnh s\u1ebd l\u00e0 50%.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-position: 25% 75%<\/span><\/td>\n<td style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-74516 size-large\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-percentage-vippro-640x520.jpg\" alt=\"background css - itviec blog\" width=\"640\" height=\"520\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-percentage-vippro-768x624.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-percentage-vippro-300x244.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-percentage-vippro-200x163.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-percentage-vippro-100x81.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-percentage-vippro-554x450.jpg 554w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-percentage-vippro.jpg 1430w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>x-pos y-pos<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Gi\u00e1 tr\u1ecb \u0111\u1ea7u ti\u00ean x\u00e1c \u0111\u1ecbnh v\u1ecb tr\u00ed theo chi\u1ec1u ngang, gi\u00e1 tr\u1ecb th\u1ee9 hai x\u00e1c \u0111\u1ecbnh v\u1ecb tr\u00ed theo chi\u1ec1u d\u1ecdc.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">G\u00f3c tr\u00ean c\u00f9ng b\u00ean tr\u00e1i l\u00e0 0 0. C\u00e1c \u0111\u01a1n v\u1ecb c\u00f3 th\u1ec3 l\u00e0 pixel (0px 0px) ho\u1eb7c b\u1ea5t k\u1ef3 \u0111\u01a1n v\u1ecb CSS n\u00e0o kh\u00e1c. N\u1ebfu b\u1ea1n ch\u1ec9 \u0111\u1ecbnh m\u1ed9t gi\u00e1 tr\u1ecb, gi\u00e1 tr\u1ecb c\u00f2n l\u1ea1i m\u1eb7c \u0111\u1ecbnh s\u1ebd l\u00e0 50%.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">C\u00f3 th\u1ec3 k\u1ebft h\u1ee3p c\u1ea3 t\u1ec9 l\u1ec7 ph\u1ea7n tr\u0103m v\u00e0 c\u00e1c v\u1ecb tr\u00ed \u0111\u01b0\u1ee3c \u0111\u1eb7t t\u00ean.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-position: 80px 30px;<\/span><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-74515 size-large\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-px-vippro-640x518.jpg\" alt=\"background css - itviec blog\" width=\"640\" height=\"518\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-px-vippro-768x621.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-px-vippro-300x243.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-px-vippro-200x162.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-px-vippro-100x81.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-px-vippro-556x450.jpg 556w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-position-px-vippro.jpg 1436w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td>\n<p style=\"text-align: left;\"><b>initial<\/b><\/p>\n<\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp thu\u1ed9c t\u00ednh v\u1ec1 gi\u00e1 tr\u1ecb m\u1eb7c \u0111\u1ecbnh.<\/span><\/td>\n<td style=\"text-align: left;\"><\/td>\n<td style=\"text-align: left;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>inherit<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">K\u1ebf th\u1eeba thu\u1ed9c t\u00ednh t\u1eeb ph\u1ea7n t\u1eed cha.<\/span><\/td>\n<td style=\"text-align: left;\"><\/td>\n<td style=\"text-align: left;\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><b>L\u01b0u \u00fd<\/b><span style=\"font-weight: 400;\">:\u00a0<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u0110\u1ed1i v\u1edbi k\u00fd hi\u1ec7u x%y%, \u1edf \u0111\u00e2y x% bi\u1ec3u th\u1ecb v\u1ecb tr\u00ed n\u1eb1m ngang &amp; y% bi\u1ec3u th\u1ecb v\u1ecb tr\u00ed th\u1eb3ng \u0111\u1ee9ng so v\u1edbi v\u1ecb tr\u00ed ban \u0111\u1ea7u, t\u1ee9c l\u00e0 tr\u00ean c\u00f9ng b\u00ean tr\u00e1i.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u0110\u1ed1i v\u1edbi k\u00fd hi\u1ec7u x-pos y-pos, \u1edf \u0111\u00e2y c\u00e1c \u0111\u01a1n v\u1ecb \u0111\u01b0\u1ee3c bi\u1ec3u th\u1ecb b\u1eb1ng pixel ho\u1eb7c b\u1ea5t k\u1ef3 \u0111\u01a1n v\u1ecb CSS n\u00e0o kh\u00e1c.<\/span><\/li>\n<\/ul>\n<h3><b>background-origin<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Thu\u1ed9c t\u00ednh background-origin \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 x\u00e1c \u0111\u1ecbnh v\u1ecb tr\u00ed b\u1eaft \u0111\u1ea7u c\u1ee7a background-image trong m\u1ed9t ph\u1ea7n t\u1eed HTML. N\u00f3 quy \u0111\u1ecbnh khu v\u1ef1c m\u00e0 background-image s\u1ebd \u0111\u01b0\u1ee3c v\u1ebd, \u1ea3nh h\u01b0\u1edfng \u0111\u1ebfn c\u00e1ch hi\u1ec3n th\u1ecb background khi ph\u1ea7n t\u1eed c\u00f3 padding, border ho\u1eb7c content.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-73279 size-large\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/Border-css-structure-vippro-640x343.png\" alt=\"background css - itviec blog\" width=\"640\" height=\"343\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/Border-css-structure-vippro-1600x858.png 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/Border-css-structure-vippro-300x161.png 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/Border-css-structure-vippro-200x107.png 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/Border-css-structure-vippro-100x54.png 100w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">C\u00fa ph\u00e1p:<\/span><\/p>\n<pre><b>background-origin: padding-box | border-box | content-box | initial | inherit;<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">Thu\u1ed9c t\u00ednh background-origin c\u00f3 th\u1ec3 nh\u1eadn nhi\u1ec1u gi\u00e1 tr\u1ecb kh\u00e1c nhau, bao g\u1ed3m:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<p style=\"text-align: left;\"><b>Gi\u00e1 tr\u1ecb<\/b><\/p>\n<\/td>\n<td style=\"text-align: left;\"><b>M\u00f4 t\u1ea3<\/b><\/td>\n<td style=\"text-align: left;\"><b>V\u00ed d\u1ee5<\/b><\/td>\n<td style=\"text-align: left;\"><strong>H\u00ecnh minh h\u1ecda<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>padding-box<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Background image s\u1ebd b\u1eaft \u0111\u1ea7u t\u1eeb r\u00eca ngo\u00e0i c\u1ee7a padding, bao g\u1ed3m c\u1ea3 padding v\u00e0 border.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-origin: padding-box;<\/span><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-74530 size-large\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-origin-padding-box-vippro-640x517.png\" alt=\"background css - itviec blog\" width=\"640\" height=\"517\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-origin-padding-box-vippro-768x621.png 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-origin-padding-box-vippro-300x243.png 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-origin-padding-box-vippro-200x162.png 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-origin-padding-box-vippro-100x81.png 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-origin-padding-box-vippro-557x450.png 557w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-origin-padding-box-vippro.png 1440w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td>\n<p style=\"text-align: left;\"><b>border-box<\/b><\/p>\n<\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Background image s\u1ebd b\u1eaft \u0111\u1ea7u t\u1eeb r\u00eca ngo\u00e0i c\u1ee7a border, bao g\u1ed3m padding, border v\u00e0 n\u1ed9i dung.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-origin: border-box;<\/span><\/td>\n<td style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-74531 size-large\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-origin-border-box-vippro-640x518.png\" alt=\"background css - itviec blog\" width=\"640\" height=\"518\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-origin-border-box-vippro-768x622.png 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-origin-border-box-vippro-300x243.png 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-origin-border-box-vippro-200x162.png 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-origin-border-box-vippro-100x81.png 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-origin-border-box-vippro-556x450.png 556w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-origin-border-box-vippro.png 1438w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>content-box<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">\u0110\u00e2y l\u00e0 gi\u00e1 tr\u1ecb m\u1eb7c \u0111\u1ecbnh. Background image s\u1ebd b\u1eaft \u0111\u1ea7u t\u1eeb r\u00eca ngo\u00e0i c\u1ee7a n\u1ed9i dung, bao g\u1ed3m padding, kh\u00f4ng bao g\u1ed3m border.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-origin: content-box;<\/span><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-74529 size-large\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-origin-content-box-vippro-640x517.png\" alt=\"background css - itviec blog\" width=\"640\" height=\"517\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-origin-content-box-vippro-768x621.png 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-origin-content-box-vippro-300x243.png 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-origin-content-box-vippro-200x162.png 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-origin-content-box-vippro-100x81.png 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-origin-content-box-vippro-557x450.png 557w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-origin-content-box-vippro.png 1440w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td>\n<p style=\"text-align: left;\"><b>initial<\/b><\/p>\n<\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp thu\u1ed9c t\u00ednh v\u1ec1 gi\u00e1 tr\u1ecb m\u1eb7c \u0111\u1ecbnh.<\/span><\/td>\n<td style=\"text-align: left;\"><\/td>\n<td style=\"text-align: left;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>inherit<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">K\u1ebf th\u1eeba thu\u1ed9c t\u00ednh t\u1eeb ph\u1ea7n t\u1eed cha.<\/span><\/td>\n<td style=\"text-align: left;\"><\/td>\n<td style=\"text-align: left;\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3><b>background-clip<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Thu\u1ed9c t\u00ednh background-clip quy \u0111\u1ecbnh ph\u1ea1m vi m\u00e0 background image ho\u1eb7c background color s\u1ebd bao ph\u1ee7, \u1ea3nh h\u01b0\u1edfng \u0111\u1ebfn c\u00e1ch hi\u1ec3n th\u1ecb background khi ph\u1ea7n t\u1eed c\u00f3 padding, border ho\u1eb7c n\u1ed9i dung. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">C\u00fa ph\u00e1p:<\/span><\/p>\n<pre><b>background-clip: border-box | padding-box | content-box | initial | inherit;<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">Thu\u1ed9c t\u00ednh n\u00e0y c\u00f3 n\u0103m gi\u00e1 tr\u1ecb ch\u00ednh:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<p style=\"text-align: left;\"><b>Gi\u00e1 tr\u1ecb<\/b><\/p>\n<\/td>\n<td style=\"text-align: left;\"><b>M\u00f4 t\u1ea3<\/b><\/td>\n<td style=\"text-align: left;\"><b>V\u00ed d\u1ee5<\/b><\/td>\n<td style=\"text-align: left;\"><strong>H\u00ecnh minh h\u1ecda<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>border-box<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">\u0110\u00e2y l\u00e0 gi\u00e1 tr\u1ecb m\u1eb7c \u0111\u1ecbnh. Background image ho\u1eb7c background color s\u1ebd bao ph\u1ee7 to\u00e0n b\u1ed9 ph\u1ea7n t\u1eed, bao g\u1ed3m padding, border v\u00e0 n\u1ed9i dung.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-clip: border-box;<\/span><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-74537 alignleft\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-clip-border-box-vippro-640x517.png\" alt=\"\" width=\"640\" height=\"517\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-clip-border-box-vippro-768x620.png 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-clip-border-box-vippro-300x242.png 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-clip-border-box-vippro-200x162.png 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-clip-border-box-vippro-100x81.png 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-clip-border-box-vippro-557x450.png 557w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-clip-border-box-vippro.png 1434w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td>\n<p style=\"text-align: left;\"><b>padding-box<\/b><\/p>\n<\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Background image ho\u1eb7c background color s\u1ebd bao ph\u1ee7 ph\u1ea7n t\u1eed, bao g\u1ed3m padding v\u00e0 n\u1ed9i dung, kh\u00f4ng bao g\u1ed3m border.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-clip: padding-box;<\/span><\/td>\n<td style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-74536\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-clip-padding-box-vippro-640x517.png\" alt=\"\" width=\"640\" height=\"517\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-clip-padding-box-vippro-768x621.png 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-clip-padding-box-vippro-300x242.png 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-clip-padding-box-vippro-200x162.png 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-clip-padding-box-vippro-100x81.png 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-clip-padding-box-vippro-557x450.png 557w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-clip-padding-box-vippro.png 1438w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>content-box<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Background image ho\u1eb7c background color ch\u1ec9 bao ph\u1ee7 n\u1ed9i dung c\u1ee7a ph\u1ea7n t\u1eed, kh\u00f4ng bao g\u1ed3m padding ho\u1eb7c border.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-clip: content-box;<\/span><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-74535 alignleft\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-clip-content-box-vippro-640x518.png\" alt=\"\" width=\"640\" height=\"518\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-clip-content-box-vippro-768x622.png 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-clip-content-box-vippro-300x243.png 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-clip-content-box-vippro-200x162.png 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-clip-content-box-vippro-100x81.png 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-clip-content-box-vippro-556x450.png 556w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-clip-content-box-vippro.png 1438w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td>\n<p style=\"text-align: left;\"><b>text<\/b><\/p>\n<\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Background image ho\u1eb7c background color ch\u1ec9 bao ph\u1ee7 ph\u1ea7n v\u0103n b\u1ea3n c\u1ee7a ph\u1ea7n t\u1eed, kh\u00f4ng bao g\u1ed3m c\u00e1c ph\u1ea7n t\u1eed con kh\u00e1c.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-clip: text;<\/span><\/td>\n<td style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-74534\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-clip-text-vippro-640x519.png\" alt=\"\" width=\"640\" height=\"519\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-clip-text-vippro-768x623.png 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-clip-text-vippro-300x243.png 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-clip-text-vippro-200x162.png 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-clip-text-vippro-100x81.png 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-clip-text-vippro-555x450.png 555w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-clip-text-vippro.png 1432w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>inherit<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">K\u1ebf th\u1eeba thu\u1ed9c t\u00ednh t\u1eeb ph\u1ea7n t\u1eed cha.<\/span><\/td>\n<td style=\"text-align: left;\"><\/td>\n<td style=\"text-align: left;\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3><b>background-size<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Thu\u1ed9c t\u00ednh background-size \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 x\u00e1c \u0111\u1ecbnh k\u00edch th\u01b0\u1edbc c\u1ee7a h\u00ecnh n\u1ec1n trong m\u1ed9t ph\u1ea7n t\u1eed HTML. Thu\u1ed9c t\u00ednh n\u00e0y ch\u1ec9 ho\u1ea1t \u0111\u1ed9ng khi thu\u1ed9c t\u00ednh background-image \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 \u0111\u1eb7t h\u00ecnh \u1ea3nh ho\u1eb7c pattern cho background. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">C\u00fa ph\u00e1p nh\u01b0 sau:<\/span><\/p>\n<pre><b>background-size: auto | length | cover | contain | initial | inherit;<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">Trong \u0111\u00f3:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><b>Gi\u00e1 tr\u1ecb<\/b><\/td>\n<td style=\"text-align: left;\"><b>M\u00f4 t\u1ea3<\/b><\/td>\n<td style=\"text-align: left;\"><b>V\u00ed d\u1ee5<\/b><\/td>\n<td style=\"text-align: left;\"><strong>H\u00ecnh minh h\u1ecda<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>auto<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Background image s\u1ebd gi\u1eef nguy\u00ean k\u00edch th\u01b0\u1edbc g\u1ed1c v\u00e0 c\u00f3 th\u1ec3 kh\u00f4ng bao ph\u1ee7 to\u00e0n b\u1ed9 ph\u1ea7n t\u1eed.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-size: auto;<\/span><\/td>\n<td style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-74544 size-large\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-auto-vippro-640x519.jpg\" alt=\"background css - itviec blog\" width=\"640\" height=\"519\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-auto-vippro-768x623.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-auto-vippro-300x243.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-auto-vippro-200x162.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-auto-vippro-100x81.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-auto-vippro-555x450.jpg 555w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-auto-vippro.jpg 1438w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>length<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Gi\u00e1 tr\u1ecb \u0111\u1ea7u ti\u00ean x\u00e1c \u0111\u1ecbnh chi\u1ec1u r\u1ed9ng, gi\u00e1 tr\u1ecb th\u1ee9 hai x\u00e1c \u0111\u1ecbnh chi\u1ec1u cao. N\u1ebfu ch\u1ec9 cung c\u1ea5p m\u1ed9t gi\u00e1 tr\u1ecb, gi\u00e1 tr\u1ecb th\u1ee9 hai m\u1eb7c \u0111\u1ecbnh s\u1ebd l\u00e0 &#8220;auto&#8221;.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-size: 500px;<\/span><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-74545 size-large\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-px-vippro-640x519.jpg\" alt=\"background css - itviec blog\" width=\"640\" height=\"519\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-px-vippro-768x623.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-px-vippro-300x243.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-px-vippro-200x162.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-px-vippro-100x81.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-px-vippro-555x450.jpg 555w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-px-vippro.jpg 1438w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>percentage<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp chi\u1ec1u r\u1ed9ng v\u00e0 chi\u1ec1u cao c\u1ee7a background image theo t\u1ef7 l\u1ec7 ph\u1ea7n tr\u0103m c\u1ee7a ph\u1ea7n t\u1eed cha.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Gi\u00e1 tr\u1ecb \u0111\u1ea7u ti\u00ean thi\u1ebft l\u1eadp chi\u1ec1u r\u1ed9ng, gi\u00e1 tr\u1ecb th\u1ee9 hai thi\u1ebft l\u1eadp chi\u1ec1u cao. N\u1ebfu b\u1ea1n ch\u1ec9 cung c\u1ea5p m\u1ed9t gi\u00e1 tr\u1ecb, gi\u00e1 tr\u1ecb th\u1ee9 hai s\u1ebd m\u1eb7c \u0111\u1ecbnh l\u00e0 &#8220;auto&#8221;.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-size: 70%;<\/span><\/td>\n<td style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-74543 size-large\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-percentage-vippro-640x518.jpg\" alt=\"background css - itviec blog\" width=\"640\" height=\"518\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-percentage-vippro-768x621.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-percentage-vippro-300x243.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-percentage-vippro-200x162.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-percentage-vippro-100x81.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-percentage-vippro-556x450.jpg 556w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-percentage-vippro.jpg 1436w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>cover<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Background image \u0111\u01b0\u1ee3c k\u00e9o d\u00e3n \u0111\u1ec3 bao ph\u1ee7 to\u00e0n b\u1ed9 ph\u1ea7n t\u1eed, gi\u1eef nguy\u00ean t\u1ef7 l\u1ec7 khung h\u00ecnh.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-size: cover;<\/span><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-74542 size-large\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-cover-vippro-640x519.jpg\" alt=\"background css - itviec blog\" width=\"640\" height=\"519\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-cover-vippro-768x623.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-cover-vippro-300x243.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-cover-vippro-200x162.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-cover-vippro-100x81.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-cover-vippro-555x450.jpg 555w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-cover-vippro.jpg 1440w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>contain<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Background s\u1ebd \u0111\u01b0\u1ee3c \u0111i\u1ec1u ch\u1ec9nh \u0111\u1ec3 v\u1eeba v\u1edbi ph\u1ea7n t\u1eed m\u00e0 kh\u00f4ng b\u1ecb bi\u1ebfn d\u1ea1ng, gi\u1eef nguy\u00ean t\u1ef7 l\u1ec7 khung h\u00ecnh.<\/span><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">background-size: contain;<\/span><\/td>\n<td style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-74546 size-large\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-contain-vippro-640x518.png\" alt=\"background css - itviec blog\" width=\"640\" height=\"518\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-contain-vippro-768x622.png 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-contain-vippro-300x243.png 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-contain-vippro-200x162.png 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-contain-vippro-100x81.png 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-contain-vippro-556x450.png 556w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-size-contain-vippro.png 1442w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><b>initial<\/b><\/td>\n<td style=\"text-align: left;\"><span style=\"font-weight: 400;\">Background image s\u1eed d\u1ee5ng k\u00edch th\u01b0\u1edbc m\u1eb7c \u0111\u1ecbnh c\u1ee7a tr\u00ecnh duy\u1ec7t.<\/span><\/td>\n<td style=\"text-align: left;\"><\/td>\n<td style=\"text-align: left;\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><span class=\"ez-toc-section\" id=\"3_vi_du_ve_cach_su_dung_background_CSS\"><\/span><b>3 v\u00ed d\u1ee5 v\u1ec1 c\u00e1ch s\u1eed d\u1ee5ng background CSS<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><b>Thi\u1ebft l\u1eadp background v\u1edbi t\u1eeb kho\u00e1 m\u00e0u s\u1eafc<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp background b\u1eb1ng t\u1eeb kh\u00f3a m\u00e0u s\u1eafc l\u00e0 c\u00e1ch \u0111\u01a1n gi\u1ea3n nh\u1ea5t \u0111\u1ec3 thay \u0111\u1ed5i n\u1ec1n c\u1ee7a m\u1ed9t ph\u1ea7n t\u1eed. B\u1ea1n c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng t\u00ean m\u00e0u chu\u1ea9n ho\u1eb7c m\u00e3 m\u00e0u trong CSS.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">B\u1ea1n c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng thu\u1ed9c t\u00ednh <strong>background-color<\/strong> nh\u01b0 sau:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">&lt;!DOCTYPE html&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;html&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;head&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;style&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">body {<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0background-color: lightblue;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">}<\/span>\r\n\r\n<span style=\"font-weight: 400;\">div {<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0background-color: coral;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0padding: 20px;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0margin: 10px;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">}<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;\/style&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;\/head&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;body&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;h1&gt;Thi\u1ebft l\u1eadp Background v\u1edbi T\u1eeb Kho\u00e1 M\u00e0u S\u1eafc&lt;\/h1&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;p&gt;N\u1ec1n c\u1ee7a trang \u0111\u01b0\u1ee3c thi\u1ebft l\u1eadp v\u1edbi m\u00e0u \"lightblue\".&lt;\/p&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;div&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0&lt;p&gt;N\u1ec1n c\u1ee7a kh\u1ed1i div n\u00e0y \u0111\u01b0\u1ee3c thi\u1ebft l\u1eadp v\u1edbi m\u00e0u \"coral\".&lt;\/p&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;\/div&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;\/body&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;\/html&gt;<\/span><\/pre>\n<p><b>K\u1ebft qu\u1ea3:<\/b><span style=\"font-weight: 400;\"> N\u1ec1n c\u1ee7a to\u00e0n b\u1ed9 trang web \u0111\u01b0\u1ee3c thi\u1ebft l\u1eadp th\u00e0nh m\u00e0u xanh nh\u1ea1t (light blue). N\u1ec1n c\u1ee7a ph\u1ea7n t\u1eed &lt;div&gt; \u0111\u01b0\u1ee3c thi\u1ebft l\u1eadp th\u00e0nh m\u00e0u cam san h\u00f4 (coral), t\u1ea1o s\u1ef1 t\u01b0\u01a1ng ph\u1ea3n v\u00e0 \u0111i\u1ec3m nh\u1ea5n. <\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-74476\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-vippro.png\" alt=\"\" width=\"1188\" height=\"1192\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-vippro.png 1188w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-vippro-300x300.png 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-vippro-768x771.png 638w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-vippro-200x200.png 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-vippro-100x100.png 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-vippro-448x450.png 448w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-color-vippro-120x120.png 120w\" sizes=\"auto, (max-width: 1188px) 100vw, 1188px\" \/><\/p>\n<h3><b>Thi\u1ebft l\u1eadp background v\u1edbi h\u00ecnh \u1ea3nh<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp background b\u1eb1ng h\u00ecnh \u1ea3nh cho ph\u00e9p b\u1ea1n th\u00eam h\u00ecnh \u1ea3nh v\u00e0o n\u1ec1n c\u1ee7a m\u1ed9t ph\u1ea7n t\u1eed, gi\u00fap giao di\u1ec7n tr\u1edf n\u00ean sinh \u0111\u1ed9ng v\u00e0 th\u00fa v\u1ecb h\u01a1n.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">B\u1ea1n c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng c\u00e1c thu\u1ed9c t\u00ednh <strong>background-image, background-repeat<\/strong> v\u00e0 <strong>background-size<\/strong> nh\u01b0 sau:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">&lt;!DOCTYPE html&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;html&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;head&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;style&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">body {<\/span>\r\n\r\n<span style=\"font-weight: 400;\">  background-image: url(\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/laptop-1-scaled.jpeg\"); <\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0background-repeat: no-repeat;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0background-size: cover;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">}<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;\/style&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;\/head&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;body&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;h1&gt;Thi\u1ebft l\u1eadp Background v\u1edbi h\u00ecnh \u1ea3nh&lt;\/h1&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;\/body&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;\/html&gt;<\/span><\/pre>\n<p><b>K\u1ebft qu\u1ea3<\/b><span style=\"font-weight: 400;\">:\u00a0<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Thu\u1ed9c t\u00ednh background-image \u0111\u1eb7t h\u00ecnh \u1ea3nh v\u1edbi URL t\u01b0\u01a1ng \u1ee9ng l\u00e0m n\u1ec1n cho to\u00e0n b\u1ed9 trang web.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Thu\u1ed9c t\u00ednh background-repeat: no-repeat; \u0111\u1ea3m b\u1ea3o r\u1eb1ng h\u00ecnh \u1ea3nh kh\u00f4ng l\u1eb7p l\u1ea1i.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Thu\u1ed9c t\u00ednh background-size: cover; \u0111\u1ea3m b\u1ea3o r\u1eb1ng h\u00ecnh \u1ea3nh n\u1ec1n bao ph\u1ee7 to\u00e0n b\u1ed9 v\u00f9ng n\u1ec1n, \u0111i\u1ec1u ch\u1ec9nh k\u00edch th\u01b0\u1edbc \u0111\u1ec3 ph\u00f9 h\u1ee3p m\u00e0 kh\u00f4ng l\u00e0m m\u00e9o h\u00ecnh \u1ea3nh.<\/span><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-74568\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-vippro-1-640x518.jpg\" alt=\"\" width=\"640\" height=\"518\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-vippro-1.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-vippro-1-300x243.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-vippro-1-200x162.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-vippro-1-100x81.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-image-vippro-1-556x450.jpg 556w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3><b>Thi\u1ebft l\u1eadp Background v\u1edbi nhi\u1ec1u h\u00ecnh \u1ea3nh<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">CSS cho ph\u00e9p b\u1ea1n thi\u1ebft l\u1eadp nhi\u1ec1u h\u00ecnh \u1ea3nh n\u1ec1n cho c\u00f9ng m\u1ed9t ph\u1ea7n t\u1eed. C\u00e1c h\u00ecnh n\u1ec1n \u0111\u01b0\u1ee3c x\u1ebfp ch\u1ed3ng l\u00ean nhau, v\u1edbi h\u00ecnh n\u1ec1n \u0111\u1ea7u ti\u00ean \u0111\u01b0\u1ee3c v\u1ebd \u1edf tr\u00ean c\u00f9ng.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">B\u1ea1n c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng thu\u1ed9c t\u00ednh <strong>background-image <\/strong>nh\u01b0 sau:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">&lt;!DOCTYPE html&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;html&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;head&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;style&gt;\u00a0<\/span>\r\n\r\n<span style=\"font-weight: 400;\">body {<\/span>\r\n\r\n<span style=\"font-weight: 400;\">  background-image: url('img_tree.gif'), url('paper.gif');<\/span>\r\n<span style=\"font-weight: 400;\">}<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;\/style&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;\/head&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;body&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;h1&gt;Thi\u1ebft l\u1eadp Background v\u1edbi nhi\u1ec1u h\u00ecnh \u1ea3nh&lt;\/h1&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;\/body&gt;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">&lt;\/html&gt;<\/span><\/pre>\n<p><b>K\u1ebft qu\u1ea3:<\/b><span style=\"font-weight: 400;\"> Thu\u1ed9c t\u00ednh background-image: url(&#8216;img_tree.gif&#8217;), url(&#8216;paper.gif&#8217;); \u0111\u1eb7t hai h\u00ecnh \u1ea3nh img_tree.gif v\u00e0 paper.gif \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng l\u00e0m n\u1ec1n.\u00a0<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-74569 size-full\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-images-vippro-1.jpg\" alt=\"\" width=\"1436\" height=\"1164\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-images-vippro-1.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-images-vippro-1-300x243.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-images-vippro-1-200x162.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-images-vippro-1-100x81.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/background-css-images-vippro-1-555x450.jpg 555w\" sizes=\"auto, (max-width: 1436px) 100vw, 1436px\" \/><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Cac_cau_hoi_thuong_gap_ve_background_CSS\"><\/span><b>C\u00e1c c\u00e2u h\u1ecfi th\u01b0\u1eddng g\u1eb7p v\u1ec1 background CSS<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><b>C\u00f3 th\u1ec3 d\u00f9ng transition \u0111\u1ec3 thay \u0111\u1ed5i background-color kh\u00f4ng?<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">B\u1ea1n ho\u00e0n to\u00e0n c\u00f3 th\u1ec3 th\u1ef1c hi\u1ec7n thay \u0111\u1ed5i background-color b\u1eb1ng thu\u1ed9c t\u00ednh transition CSS. \u0110\u1ea7u ti\u00ean, b\u1ea1n c\u1ea7n khai b\u00e1o hai thu\u1ed9c t\u00ednh CSS n\u00e0y nh\u01b0 v\u00ed d\u1ee5 b\u00ean d\u01b0\u1edbi:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">\/*\u0110\u1eb7t background-color ban \u0111\u1ea7u*\/<\/span>\r\n\r\n<span style=\"font-weight: 400;\">div {<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0background-color: blue;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">}<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\/*Th\u00eam hi\u1ec7u \u1ee9ng transition *\/<\/span>\r\n\r\n<span style=\"font-weight: 400;\">div {<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0transition: background-color 1s;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">}<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\/*Thay \u0111\u1ed5i background color khi hover *\/<\/span>\r\n\r\n<span style=\"font-weight: 400;\">div:hover {<\/span>\r\n\r\n<span style=\"font-weight: 400;\">background-color: red;<\/span><\/pre>\n<p><b>K\u1ebft qu\u1ea3:<\/b><span style=\"font-weight: 400;\"> \u0110o\u1ea1n code b\u00ean tr\u00ean s\u1ebd l\u00e0m cho m\u00e0u n\u1ec1n c\u1ee7a ph\u1ea7n t\u1eed div chuy\u1ec3n t\u1eeb xanh sang \u0111\u1ecf trong 1 gi\u00e2y khi di chu\u1ed9t qua.<\/span><\/p>\n<h3><b>Khi n\u00e0o n\u00ean d\u00f9ng background-image?<\/b><\/h3>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>H\u00ecnh \u1ea3nh kh\u00f4ng ph\u1ea3i l\u00e0 n\u1ed9i dung ch\u00ednh<\/b><span style=\"font-weight: 400;\">: S\u1eed d\u1ee5ng background-image khi h\u00ecnh \u1ea3nh \u0111\u01b0\u1ee3c d\u00f9ng \u0111\u1ec3 trang tr\u00ed, t\u1ea1o \u0111i\u1ec3m nh\u1ea5n ch\u1ee9 kh\u00f4ng ph\u1ea3i l\u00e0 n\u1ed9i dung ch\u00ednh c\u1ea7n truy\u1ec1n t\u1ea3i. V\u00ed d\u1ee5 h\u00ecnh n\u1ec1n trang web, h\u1ecda ti\u1ebft trang tr\u00ed tr\u00ean c\u00e1c ph\u1ea7n t\u1eed.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Thay th\u1ebf v\u0103n b\u1ea3n b\u1eb1ng h\u00ecnh \u1ea3nh:<\/b><span style=\"font-weight: 400;\"> S\u1eed d\u1ee5ng background-image \u0111\u1ec3 thay th\u1ebf v\u0103n b\u1ea3n b\u1eb1ng h\u00ecnh \u1ea3nh (ch\u1ec9 n\u00ean d\u00f9ng trong tr\u01b0\u1eddng h\u1ee3p \u0111\u1eb7c bi\u1ec7t), v\u00ed d\u1ee5 nh\u01b0 logo, ti\u00eau \u0111\u1ec1 trang web \u0111\u01b0\u1ee3c thi\u1ebft k\u1ebf b\u1eb1ng h\u00ecnh \u1ea3nh.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>In \u1ea5n trang web: <\/b><span style=\"font-weight: 400;\">S\u1eed d\u1ee5ng background-image n\u1ebfu b\u1ea1n mu\u1ed1n in \u1ea5n trang web v\u00e0 kh\u00f4ng mu\u1ed1n h\u00ecnh \u1ea3nh n\u1ec1n \u0111\u01b0\u1ee3c in ra theo m\u1eb7c \u0111\u1ecbnh.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Gi\u1ea3m th\u1eddi gian t\u1ea3i trang:<\/b><span style=\"font-weight: 400;\"> S\u1eed d\u1ee5ng background-image k\u1ebft h\u1ee3p v\u1edbi CSS sprites (\u1ea3nh gh\u00e9p) \u0111\u1ec3 gi\u1ea3m th\u1eddi gian t\u1ea3i trang b\u1eb1ng c\u00e1ch gom nhi\u1ec1u h\u00ecnh \u1ea3nh nh\u1ecf th\u00e0nh m\u1ed9t h\u00ecnh l\u1edbn.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Ch\u1ec9 hi\u1ec3n th\u1ecb m\u1ed9t ph\u1ea7n c\u1ee7a h\u00ecnh \u1ea3nh: <\/b><span style=\"font-weight: 400;\">S\u1eed d\u1ee5ng background-image k\u1ebft h\u1ee3p v\u1edbi c\u00e1c thu\u1ed9c t\u00ednh kh\u00e1c nh\u01b0 background-position \u0111\u1ec3 ch\u1ec9 hi\u1ec3n th\u1ecb m\u1ed9t ph\u1ea7n c\u1ee7a h\u00ecnh \u1ea3nh (c\u00f3 th\u1ec3 k\u1ebft h\u1ee3p v\u1edbi CSS sprites).<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>\u0110i\u1ec1u ch\u1ec9nh\u00a0 h\u00ecnh \u1ea3nh \u0111\u1ec3 l\u1ea5p \u0111\u1ea7y background: <\/b><span style=\"font-weight: 400;\">S\u1eed d\u1ee5ng background-image v\u1edbi thu\u1ed9c t\u00ednh background-size: cover \u0111\u1ec3 k\u00e9o gi\u00e3n h\u00ecnh n\u1ec1n, ph\u1ee7 k\u00edn to\u00e0n b\u1ed9 ph\u1ea7n t\u1eed ch\u1ee9a.<\/span><\/li>\n<\/ul>\n<h3><b>C\u00f3 n\u00ean t\u1ea1o background v\u1edbi video kh\u00f4ng?<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">C\u00e2u tr\u1ea3 l\u1eddi ph\u1ee5 thu\u1ed9c v\u00e0o m\u1ee5c ti\u00eau v\u00e0 \u0111\u1ed1i t\u01b0\u1ee3ng m\u1ee5c ti\u00eau c\u1ee7a trang web. N\u1ebfu b\u1ea1n mu\u1ed1n t\u1ea1o m\u1ed9t trang web thu h\u00fat s\u1ef1 ch\u00fa \u00fd, t\u0103ng c\u01b0\u1eddng s\u1ef1 t\u01b0\u01a1ng t\u00e1c v\u00e0 th\u1ec3 hi\u1ec7n phong c\u00e1ch th\u01b0\u01a1ng hi\u1ec7u c\u1ee7a m\u00ecnh, th\u00ec video n\u1ec1n c\u00f3 th\u1ec3 l\u00e0 m\u1ed9t l\u1ef1a ch\u1ecdn t\u1ed1t. Tuy nhi\u00ean, c\u1ea7n \u0111\u1ea3m b\u1ea3o r\u1eb1ng b\u1ea1n \u0111\u00e3 t\u1ed1i \u01b0u h\u00f3a video \u0111\u1ec3 t\u1ea3i nhanh, s\u1eed d\u1ee5ng video c\u00f3 ch\u1ea5t l\u01b0\u1ee3ng cao v\u00e0 t\u01b0\u01a1ng th\u00edch v\u1edbi nhi\u1ec1u tr\u00ecnh duy\u1ec7t, thi\u1ebft b\u1ecb kh\u00e1c nhau.<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Tong_ket_Background_CSS\"><\/span><b>T\u1ed5ng k\u1ebft Background CSS<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Nh\u01b0 v\u1eady, b\u00e0i vi\u1ebft \u0111\u00e3 \u0111\u01b0a ra nh\u1eefng h\u01b0\u1edbng d\u1eabn chi ti\u1ebft v\u1ec1 c\u00e1ch s\u1eed d\u1ee5ng 8 thu\u1ed9c t\u00ednh background CSS. Hy v\u1ecdng nh\u1eefng v\u00ed d\u1ee5 minh ho\u1ea1 t\u01b0\u01a1ng \u1ee9ng v\u1edbi t\u1eebng n\u1ed9i dung gi\u00fap b\u1ea1n d\u1ec5 h\u00ecnh dung v\u00e0 hi\u1ec3u r\u00f5 h\u01a1n v\u1ec1 c\u00e1ch d\u00f9ng ch\u00fang. Ch\u00fac b\u1ea1n s\u1edbm th\u00e0nh th\u1ea1o background CSS \u0111\u1ec3 t\u1ea1o ra nh\u1eefng trang web \u0111\u1eb9p m\u1eaft v\u00e0 \u1ea5n t\u01b0\u1ee3ng nh\u00e9.<\/span><\/p>\n<p>Tham kh\u1ea3o c\u00e1c b\u00e0i vi\u1ebft thu\u1ed9c ch\u1ee7 \u0111\u1ec1 CSS tr\u00ean ITviec:<\/p>\n<ul>\n<li><a href=\"https:\/\/itviec.com\/blog\/transition-css\/\" target=\"_blank\" rel=\"noopener\"><strong>Transition CSS l\u00e0 g\u00ec? Ph\u00e2n bi\u1ec7t transition CSS v\u00e0 animation CSS<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/itviec.com\/blog\/border-css\/\" target=\"_blank\" rel=\"noopener\"><strong>Border CSS: H\u01b0\u1edbng d\u1eabn chi ti\u1ebft 9 c\u00e1ch s\u1eed d\u1ee5ng border CSS<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/itviec.com\/blog\/box-shadow-css\/\" target=\"_blank\" rel=\"noopener\"><strong>Box shadow CSS l\u00e0 g\u00ec? 7 c\u00e1ch d\u00f9ng box shadow CSS c\u01a1 b\u1ea3n<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/itviec.com\/blog\/animation-css\/\" target=\"_blank\" rel=\"noopener\"><strong>Animation CSS: T\u1ed5ng h\u1ee3p 11 hi\u1ec7u \u1ee9ng Animation CSS ph\u1ed5 bi\u1ebfn<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/itviec.com\/blog\/tailwind-css\/\" target=\"_blank\" rel=\"noopener\"><strong>Tailwind CSS: H\u01b0\u1edbng d\u1eabn 3 c\u00e1ch thi\u1ebft l\u1eadp Tailwind chi ti\u1ebft<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/itviec.com\/blog\/grid-css\/\" target=\"_blank\" rel=\"noopener\"><strong>Grid CSS: C\u1ea9m nang s\u1eed d\u1ee5ng Grid CSS c\u01a1 b\u1ea3n<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/itviec.com\/blog\/hover-css\/\" target=\"_blank\" rel=\"noopener\"><strong>C\u00e1ch t\u1ea1o Hover CSS v\u00e0 c\u00e1c v\u00ed d\u1ee5 c\u1ee5 th\u1ec3<\/strong><\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>CSS cung c\u1ea5p cho c\u00e1c front-end developer b\u1ed9 c\u00f4ng c\u1ee5 \u0111\u1ea7y \u0111\u1ee7 v\u00e0 linh ho\u1ea1t \u0111\u1ec3 t\u00f9y ch\u1ec9nh giao di\u1ec7n trang web, bao g\u1ed3m c\u1ea3 vi\u1ec7c t\u1ea1o background cho c\u00e1c ph\u1ea7n t\u1eed HTML. Trong b\u00e0i vi\u1ebft n\u00e0y, ITviec s\u1ebd h\u01b0\u1edbng d\u1eabn chi ti\u1ebft c\u00e1ch s\u1eed d\u1ee5ng 8 thu\u1ed9c t\u00ednh background quan tr\u1ecdng trong CSS, gi\u00fap [&hellip;]<\/p>\n","protected":false},"author":213,"featured_media":74324,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_gspb_post_css":"","footnotes":""},"categories":[109],"tags":[],"class_list":["post-74323","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-chuyen-mon-it"],"blocksy_meta":[],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.8 (Yoast SEO v27.7) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Background CSS: H\u01b0\u1edbng d\u1eabn chi ti\u1ebft c\u00e1ch d\u00f9ng 8 thu\u1ed9c t\u00ednh - ITviec Blog<\/title>\n<meta name=\"description\" content=\"H\u01b0\u1edbng d\u1eabn chi ti\u1ebft c\u00e1ch thi\u1ebft l\u1eadp Background CSS v\u1edbi 8 thu\u1ed9c t\u00ednh quen thu\u1ed9c: color, image, repeat, attachment, position,\u2026\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/itviec.com\/blog\/background-css\/\" \/>\n<meta property=\"og:locale\" content=\"vi_VN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"H\u01b0\u1edbng d\u1eabn chi ti\u1ebft c\u00e1ch d\u00f9ng 8 thu\u1ed9c t\u00ednh background CSS\" \/>\n<meta property=\"og:description\" content=\"CSS cung c\u1ea5p cho c\u00e1c front-end developer b\u1ed9 c\u00f4ng c\u1ee5 \u0111\u1ea7y \u0111\u1ee7 v\u00e0 linh ho\u1ea1t \u0111\u1ec3 t\u00f9y ch\u1ec9nh giao di\u1ec7n trang web, bao g\u1ed3m c\u1ea3 vi\u1ec7c t\u1ea1o background cho c\u00e1c ph\u1ea7n t\u1eed\" \/>\n<meta property=\"og:url\" content=\"https:\/\/itviec.com\/blog\/background-css\/\" \/>\n<meta property=\"og:site_name\" content=\"ITviec Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ITviec\" \/>\n<meta property=\"article:published_time\" content=\"2024-06-27T06:43:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/Thumbnail-background-css-vippro.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1500\" \/>\n\t<meta property=\"og:image:height\" content=\"790\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Linh Trao\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ITviec\" \/>\n<meta name=\"twitter:site\" content=\"@ITviec\" \/>\n<meta name=\"twitter:label1\" content=\"\u0110\u01b0\u1ee3c vi\u1ebft b\u1edfi\" \/>\n\t<meta name=\"twitter:data1\" content=\"Linh Trao\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc\" \/>\n\t<meta name=\"twitter:data2\" content=\"27 ph\u00fat\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Background CSS: H\u01b0\u1edbng d\u1eabn chi ti\u1ebft c\u00e1ch d\u00f9ng 8 thu\u1ed9c t\u00ednh - ITviec Blog","description":"H\u01b0\u1edbng d\u1eabn chi ti\u1ebft c\u00e1ch thi\u1ebft l\u1eadp Background CSS v\u1edbi 8 thu\u1ed9c t\u00ednh quen thu\u1ed9c: color, image, repeat, attachment, position,\u2026","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/itviec.com\/blog\/background-css\/","og_locale":"vi_VN","og_type":"article","og_title":"H\u01b0\u1edbng d\u1eabn chi ti\u1ebft c\u00e1ch d\u00f9ng 8 thu\u1ed9c t\u00ednh background CSS","og_description":"CSS cung c\u1ea5p cho c\u00e1c front-end developer b\u1ed9 c\u00f4ng c\u1ee5 \u0111\u1ea7y \u0111\u1ee7 v\u00e0 linh ho\u1ea1t \u0111\u1ec3 t\u00f9y ch\u1ec9nh giao di\u1ec7n trang web, bao g\u1ed3m c\u1ea3 vi\u1ec7c t\u1ea1o background cho c\u00e1c ph\u1ea7n t\u1eed","og_url":"https:\/\/itviec.com\/blog\/background-css\/","og_site_name":"ITviec Blog","article_publisher":"https:\/\/www.facebook.com\/ITviec","article_published_time":"2024-06-27T06:43:08+00:00","og_image":[{"width":1500,"height":790,"url":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/Thumbnail-background-css-vippro.jpg","type":"image\/jpeg"}],"author":"Linh Trao","twitter_card":"summary_large_image","twitter_creator":"@ITviec","twitter_site":"@ITviec","twitter_misc":{"\u0110\u01b0\u1ee3c vi\u1ebft b\u1edfi":"Linh Trao","\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc":"27 ph\u00fat"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/itviec.com\/blog\/background-css\/#article","isPartOf":{"@id":"https:\/\/itviec.com\/blog\/background-css\/"},"author":{"name":"Linh Trao","@id":"https:\/\/itviec.com\/blog\/#\/schema\/person\/6d1bcbfa05475cbc5a2eaf0727501a16"},"headline":"H\u01b0\u1edbng d\u1eabn chi ti\u1ebft c\u00e1ch d\u00f9ng 8 thu\u1ed9c t\u00ednh background CSS","datePublished":"2024-06-27T06:43:08+00:00","mainEntityOfPage":{"@id":"https:\/\/itviec.com\/blog\/background-css\/"},"wordCount":4609,"publisher":{"@id":"https:\/\/itviec.com\/blog\/#organization"},"image":{"@id":"https:\/\/itviec.com\/blog\/background-css\/#primaryimage"},"thumbnailUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/Thumbnail-background-css-vippro.jpg","articleSection":["Chuy\u00ean m\u00f4n IT"],"inLanguage":"vi"},{"@type":"WebPage","@id":"https:\/\/itviec.com\/blog\/background-css\/","url":"https:\/\/itviec.com\/blog\/background-css\/","name":"Background CSS: H\u01b0\u1edbng d\u1eabn chi ti\u1ebft c\u00e1ch d\u00f9ng 8 thu\u1ed9c t\u00ednh - ITviec Blog","isPartOf":{"@id":"https:\/\/itviec.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/itviec.com\/blog\/background-css\/#primaryimage"},"image":{"@id":"https:\/\/itviec.com\/blog\/background-css\/#primaryimage"},"thumbnailUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/Thumbnail-background-css-vippro.jpg","datePublished":"2024-06-27T06:43:08+00:00","description":"H\u01b0\u1edbng d\u1eabn chi ti\u1ebft c\u00e1ch thi\u1ebft l\u1eadp Background CSS v\u1edbi 8 thu\u1ed9c t\u00ednh quen thu\u1ed9c: color, image, repeat, attachment, position,\u2026","breadcrumb":{"@id":"https:\/\/itviec.com\/blog\/background-css\/#breadcrumb"},"inLanguage":"vi","potentialAction":[{"@type":"ReadAction","target":["https:\/\/itviec.com\/blog\/background-css\/"]}]},{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/itviec.com\/blog\/background-css\/#primaryimage","url":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/Thumbnail-background-css-vippro.jpg","contentUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/06\/Thumbnail-background-css-vippro.jpg","width":1500,"height":790,"caption":"background css - itviec blog"},{"@type":"BreadcrumbList","@id":"https:\/\/itviec.com\/blog\/background-css\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Chuy\u00ean m\u00f4n IT","item":"https:\/\/itviec.com\/blog\/chuyen-mon-it\/"},{"@type":"ListItem","position":2,"name":"H\u01b0\u1edbng d\u1eabn chi ti\u1ebft c\u00e1ch d\u00f9ng 8 thu\u1ed9c t\u00ednh background CSS"}]},{"@type":"WebSite","@id":"https:\/\/itviec.com\/blog\/#website","url":"https:\/\/itviec.com\/blog\/","name":"ITviec Blog","description":"IT Jobs &amp; People in Vietnam","publisher":{"@id":"https:\/\/itviec.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/itviec.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"vi"},{"@type":"Organization","@id":"https:\/\/itviec.com\/blog\/#organization","name":"ITviec","url":"https:\/\/itviec.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/itviec.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2018\/12\/itviec-black-square-facebook.png","contentUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2018\/12\/itviec-black-square-facebook.png","width":1800,"height":1800,"caption":"ITviec"},"image":{"@id":"https:\/\/itviec.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/ITviec","https:\/\/x.com\/ITviec","https:\/\/www.linkedin.com\/company\/itviec","https:\/\/www.youtube.com\/channel\/UCYthAQ3bcGr57M_ag5gHDvQ"]},{"@type":"Person","@id":"https:\/\/itviec.com\/blog\/#\/schema\/person\/6d1bcbfa05475cbc5a2eaf0727501a16","name":"Linh Trao","image":{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/03\/trao-thi-tung-linh-author-e1709892478113-100x100.jpg","url":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/03\/trao-thi-tung-linh-author-e1709892478113-100x100.jpg","contentUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/03\/trao-thi-tung-linh-author-e1709892478113-100x100.jpg","caption":"Linh Trao"},"url":"https:\/\/itviec.com\/blog\/author\/linh-trao\/"}]}},"_links":{"self":[{"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/posts\/74323","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/users\/213"}],"replies":[{"embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/comments?post=74323"}],"version-history":[{"count":0,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/posts\/74323\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/media\/74324"}],"wp:attachment":[{"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/media?parent=74323"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/categories?post=74323"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/tags?post=74323"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}