Để tạo một bố cục tương tự như trên, với 10 cột và các icon được bố trí giống Tiki trong WordPress, bạn cần sử dụng CSS Grid hoặc Flexbox để sắp xếp các phần tử trong một layout 10 cột. Đây là cách bạn có thể triển khai bằng HTML và CSS.
![]()
HTML:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | <div class="styles__ContainerWidget-sc-1905sp2-2 hkUftd" style="min-height: 126px;"> <div class="style__QuickLinksStyled-sc-1j9jq39-0 dTYmVt"> <div class="style__QuickLinkV2Styled-sc-1j9jq39-2 dYnjmk"> <a href="https://gachlatsan001.sharecodegiare.io.vn/dat-hang-so-luong-lon/"> </p> <div class="style__BorderStyled-sc-1j9jq39-4 gmDlFL" style="width: 44px; height: 44px;"> <picture class="webpimg-container"><source type="image/webp" srcset="https://salt.tikicdn.com/ts/upload/2f/52/8e/00ab5fbea9d35fcc3cadbc28d7c6b14e.png"><img srcset="https://salt.tikicdn.com/ts/upload/2f/52/8e/00ab5fbea9d35fcc3cadbc28d7c6b14e.png" width="44" height="44" alt="quick-link-icon" class="styles__StyledImg-sc-p9s3t3-0 hbqSye" style="width: 44px; height: 44px; opacity: 1;"> </picture> </div> <div class="style__QuickLinkTitleStyled-sc-1j9jq39-3 hzrFdJ" style="color: rgb(217, 56, 67);">TOP DEAL</div> <p> </a> </div> <div class="style__QuickLinkV2Styled-sc-1j9jq39-2 dYnjmk"> <a href="https://gachlatsan001.sharecodegiare.io.vn/dat-hang-so-luong-lon/"> </p> <div class="style__BorderStyled-sc-1j9jq39-4 gmDlFL" style="width: 44px; height: 44px;"> <picture class="webpimg-container"><source type="image/webp" srcset="https://salt.tikicdn.com/ts/upload/72/8d/23/a810d76829d245ddd87459150cb6bc77.png"><img srcset="https://salt.tikicdn.com/ts/upload/72/8d/23/a810d76829d245ddd87459150cb6bc77.png" width="44" height="44" alt="quick-link-icon" class="styles__StyledImg-sc-p9s3t3-0 hbqSye" style="width: 44px; height: 44px; opacity: 1;"> </picture> </div> <div class="style__QuickLinkTitleStyled-sc-1j9jq39-3 hzrFdJ" style="color: rgb(39, 39, 42);">Sỉ lẻ</div> <p> </a> </div> <div class="style__QuickLinkV2Styled-sc-1j9jq39-2 dYnjmk"> <a href="https://gachlatsan001.sharecodegiare.io.vn/dat-hang-so-luong-lon/"> </p> <div class="style__BorderStyled-sc-1j9jq39-4 gmDlFL" style="width: 44px; height: 44px;"> <picture class="webpimg-container"><source type="image/webp" srcset="https://salt.tikicdn.com/ts/upload/8b/a4/9f/84d844f70e365515b6e4e3e745dac1d5.png"><img srcset="https://salt.tikicdn.com/ts/upload/8b/a4/9f/84d844f70e365515b6e4e3e745dac1d5.png" width="44" height="44" alt="quick-link-icon" class="styles__StyledImg-sc-p9s3t3-0 hbqSye" style="width: 44px; height: 44px; opacity: 1;"> </picture> </div> <div class="style__QuickLinkTitleStyled-sc-1j9jq39-3 hzrFdJ" style="color: rgb(39, 39, 42);">Coupon siêu hot</div> <p> </a> </div> <div class="style__QuickLinkV2Styled-sc-1j9jq39-2 dYnjmk"> <a href="https://gachlatsan001.sharecodegiare.io.vn/dat-hang-so-luong-lon/"> </p> <div class="style__BorderStyled-sc-1j9jq39-4 gmDlFL" style="width: 44px; height: 44px;"> <picture class="webpimg-container"><source type="image/webp" srcset="https://salt.tikicdn.com/ts/upload/a5/d8/06/cb6ff520f12973013c81a8b14ad5e5b3.png"><img srcset="https://salt.tikicdn.com/ts/upload/a5/d8/06/cb6ff520f12973013c81a8b14ad5e5b3.png" width="44" height="44" alt="quick-link-icon" class="styles__StyledImg-sc-p9s3t3-0 hbqSye" style="width: 44px; height: 44px; opacity: 1;"> </picture> </div> <div class="style__QuickLinkTitleStyled-sc-1j9jq39-3 hzrFdJ" style="color: rgb(39, 39, 42);">Siêu sales</div> <p> </a> </div> <div class="style__QuickLinkV2Styled-sc-1j9jq39-2 dYnjmk"> <a href="https://gachlatsan001.sharecodegiare.io.vn/dat-hang-so-luong-lon/"> </p> <div class="style__BorderStyled-sc-1j9jq39-4 gmDlFL" style="width: 44px; height: 44px;"> <picture class="webpimg-container"><source type="image/webp" srcset="https://salt.tikicdn.com/ts/upload/cf/46/d1/e474a9eb803909a59927600ee64ddd4f.png"><img srcset="https://salt.tikicdn.com/ts/upload/cf/46/d1/e474a9eb803909a59927600ee64ddd4f.png" width="44" height="44" alt="quick-link-icon" class="styles__StyledImg-sc-p9s3t3-0 hbqSye" style="width: 44px; height: 44px; opacity: 1;"> </picture> </div> <div class="style__QuickLinkTitleStyled-sc-1j9jq39-3 hzrFdJ" style="color: rgb(39, 39, 42);">Hàng ngoại giá hot</div> <p> </a> </div> <div class="style__QuickLinkV2Styled-sc-1j9jq39-2 dYnjmk"> <a href="https://gachlatsan001.sharecodegiare.io.vn/dat-hang-so-luong-lon/"> </p> <div class="style__BorderStyled-sc-1j9jq39-4 gmDlFL" style="width: 44px; height: 44px;"> <picture class="webpimg-container"><source type="image/webp" srcset="https://salt.tikicdn.com/ts/upload/21/c1/02/65f847f59e5248746dc3d689faba85a0.png"><img srcset="https://salt.tikicdn.com/ts/upload/21/c1/02/65f847f59e5248746dc3d689faba85a0.png" width="44" height="44" alt="quick-link-icon" class="styles__StyledImg-sc-p9s3t3-0 hbqSye" style="width: 44px; height: 44px; opacity: 1;"> </picture> </div> <div class="style__QuickLinkTitleStyled-sc-1j9jq39-3 hzrFdJ" style="color: rgb(39, 39, 42);">Mỹ phẩm</div> <p> </a> </div> <div class="style__QuickLinkV2Styled-sc-1j9jq39-2 dYnjmk"> <a href="https://gachlatsan001.sharecodegiare.io.vn/dat-hang-so-luong-lon/"> </p> <div class="style__BorderStyled-sc-1j9jq39-4 gmDlFL" style="width: 44px; height: 44px;"> <picture class="webpimg-container"><source type="image/webp" srcset="https://salt.tikicdn.com/ts/upload/ea/4f/d9/fcd5f95210ba2f3ce68974efd0b0ae90.png"><img srcset="https://salt.tikicdn.com/ts/upload/ea/4f/d9/fcd5f95210ba2f3ce68974efd0b0ae90.png" width="44" height="44" alt="quick-link-icon" class="styles__StyledImg-sc-p9s3t3-0 hbqSye" style="width: 44px; height: 44px; opacity: 1;"> </picture> </div> <div class="style__QuickLinkTitleStyled-sc-1j9jq39-3 hzrFdJ" style="color: rgb(39, 39, 42);">Thực phẩm</div> <p><a href="https://gachlatsan001.sharecodegiare.io.vn/dat-hang-so-luong-lon/"></p> <p> </a> </div> <div class="style__QuickLinkV2Styled-sc-1j9jq39-2 dYnjmk"> <a href="https://gachlatsan001.sharecodegiare.io.vn/dat-hang-so-luong-lon/"> </p> <div class="style__BorderStyled-sc-1j9jq39-4 gmDlFL" style="width: 44px; height: 44px;"> <picture class="webpimg-container"><source type="image/webp" srcset="https://salt.tikicdn.com/ts/upload/81/05/13/417c6431ef14e702d466858d6b8b7e2f.png"><img srcset="https://salt.tikicdn.com/ts/upload/81/05/13/417c6431ef14e702d466858d6b8b7e2f.png" width="44" height="44" alt="quick-link-icon" class="styles__StyledImg-sc-p9s3t3-0 hbqSye" style="width: 44px; height: 44px; opacity: 1;"> </picture> </div> <div class="style__QuickLinkTitleStyled-sc-1j9jq39-3 hzrFdJ" style="color: rgb(39, 39, 42);">Gel dưỡng ẩm</div> <p> </a> </div> <div class="style__QuickLinkV2Styled-sc-1j9jq39-2 dYnjmk"> <a href="https://gachlatsan001.sharecodegiare.io.vn/dat-hang-so-luong-lon/"> </p> <div class="style__BorderStyled-sc-1j9jq39-4 gmDlFL" style="width: 44px; height: 44px;"> <picture class="webpimg-container"><source type="image/webp" srcset="https://salt.tikicdn.com/ts/upload/4a/47/32/47b17d8467da8f25cc3da756ff97056a.png"><img srcset="https://salt.tikicdn.com/ts/upload/4a/47/32/47b17d8467da8f25cc3da756ff97056a.png" width="44" height="44" alt="quick-link-icon" class="styles__StyledImg-sc-p9s3t3-0 hbqSye" style="width: 44px; height: 44px; opacity: 1;"> </picture> </div> <div class="style__QuickLinkTitleStyled-sc-1j9jq39-3 hzrFdJ" style="color: rgb(39, 39, 42);">Son môi</div> <p> </a> </div> <div class="style__QuickLinkV2Styled-sc-1j9jq39-2 dYnjmk"> <a href="https://gachlatsan001.sharecodegiare.io.vn/dat-hang-so-luong-lon/"> </p> <div class="style__BorderStyled-sc-1j9jq39-4 gmDlFL" style="width: 44px; height: 44px;"> <picture class="webpimg-container"><source type="image/webp" srcset="https://salt.tikicdn.com/ts/upload/e7/29/22/54acb55d05be22564873cacbfa7ffb66.png"><img srcset="https://salt.tikicdn.com/ts/upload/e7/29/22/54acb55d05be22564873cacbfa7ffb66.png" width="44" height="44" alt="quick-link-icon" class="styles__StyledImg-sc-p9s3t3-0 hbqSye" style="width: 44px; height: 44px; opacity: 1;"> </picture> </div> <div class="style__QuickLinkTitleStyled-sc-1j9jq39-3 hzrFdJ" style="color: rgb(39, 39, 42);">Dưỡng thể</div> <p> </a> </div> </p> </div> </div> |
Css:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | /*10 cot*/ .hkUftd { display: flex; padding: 16px; flex-direction: column; align-items: flex-start; gap: 12px; align-self: stretch; border-radius: 8px; background: var(--Alias-Theme, #fff); overflow-x: auto; /* Cho phép trượt ngang */ white-space: nowrap; /* Không xuống dòng danh mục */ } .dTYmVt { display: grid; grid-template-columns: repeat(10, 1fr); gap: 8px; align-self: stretch; justify-items: center; overflow-x: auto; /* Trượt ngang khi cần */ scroll-behavior: smooth; /* Hiệu ứng trượt mượt */ white-space: nowrap; /* Ngăn danh mục xuống dòng */ } .dYnjmk a { display: flex; width: 100px; flex-direction: column; align-items: center; gap: 8px; text-align: center; } .gmDlFL { border: 1px solid rgba(0, 0, 0, 0.05); border-radius: 35%; overflow: hidden; box-sizing: content-box; background: white; } .hzrFdJ { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; /* Giới hạn tối đa 2 dòng */ overflow: hidden; color: var(--Alias-Primary---On-Theme, #27272a); text-align: center; text-overflow: ellipsis; min-height: 36px; /* Đảm bảo đủ không gian cho 2 dòng */ font-family: Inter, sans-serif; font-size: 14px; font-style: normal; font-weight: 500; line-height: 150%; white-space: normal; /* Cho phép xuống dòng */ word-break: break-word; /* Xuống dòng khi cần */ } /* Định dạng trượt ngang trên thiết bị di động và máy tính bảng */ @media (max-width: 1024px) { .dTYmVt { display: flex; overflow-x: auto; gap: 12px; padding-bottom: 10px; } .dYnjmk a { flex: 0 0 auto; width: 90px; } .hkUftd { overflow-x: auto; } } |
- Combo Theme WordPress – Chìa Khóa SEO Đỉnh Cao Giúp Website Bứt Phá
- Sharecode Theme WordPress – Website Giống Thế Giới Di Động Đến 99% Dựa Trên Flatsome
- Cách seo lên top 1 google 2025 mà không phải ai cũng biết
- Mua tài khoản genspark.ai giá rẻ tại Muathemewpgiare
- Hướng dẫn cách loại bỏ Auto Sizes CSS trên WordPress 6.7

