使用CSS动画在鼠标悬停时将子类别居中下拉。

huangapple go评论120阅读模式
英文:

Center dropdown sub-categories on hovering with css animation

问题

在向我的导航栏添加CSS动画效果之前,一切都是居中的,工作得很完美,但现在有了动画,当悬停在主分类上时,子分类不再居中显示在中间。

我尝试使用以下样式:

  1. text-align: center;
  2. margin: 0 auto;
  3. left: 50%;
  4. transform: translateX(-50%);

但似乎没有起作用。

此外,我还在这里创建了一个 Codepen,以查看它的工作方式并进行实验:Codepen链接

有没有办法在悬停主分类时将子分类居中显示?

英文:

Before I added a CSS animation effect to my navbar, everything was centered and working perfect, but now with the animation, when hovering the main-categories, the sub-categories are no longer displayed centered in the middle.

I tried using

  1. text-align:center, margin:0 auto, left:50% and transform:translatex(-50%);

but nothing seems to work

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-css -->

  1. body, html {
  2. margin: 0;
  3. padding: 0;
  4. border: 0;
  5. outline: 0;
  6. box-sizing: border-box;
  7. text-align: center;
  8. width: 100%;
  9. height: 100%;
  10. }
  11. body {
  12. background-color: #FFFFFF;
  13. font-family: &#39;IBM Plex Serif&#39;, serif;
  14. font-size: 16px;
  15. font-weight: 400;
  16. color: #121212;
  17. }
  18. a {
  19. color: #121212;
  20. text-decoration: none;
  21. }
  22. a:hover {
  23. color: #E5633F;
  24. }
  25. nav {
  26. grid-area: navi;
  27. display: block;
  28. text-align: center;
  29. border-bottom: 3px solid #121212;
  30. background-color: inherit;
  31. }
  32. nav {
  33. position: -webkit-sticky;
  34. position: sticky;
  35. top: 0;
  36. cursor: pointer;
  37. z-index: 8;
  38. width: 100%;
  39. }
  40. main-categories {
  41. position: relative;
  42. display: inline-block;
  43. background-color: inherit;
  44. text-transform: uppercase;
  45. height: 42px;
  46. line-height: 42px;
  47. text-align: center;
  48. padding: 0px 22px 0px 22px;
  49. }
  50. main-categories:hover {
  51. color: #E5633F;
  52. }
  53. main-categories a {
  54. position: relative;
  55. text-decoration: none;
  56. }
  57. main-categories a:hover {
  58. color: #E5633F;
  59. }
  60. main-categories a:before{
  61. content: &#39;▪ &#39;;
  62. }
  63. sub-categories {
  64. display: none;
  65. position: absolute;
  66. width: auto;
  67. left: 50%;
  68. transform: translatex(-50%);
  69. text-align: center;
  70. white-space: nowrap;
  71. background-color: inherit;
  72. }
  73. sub-categories a {
  74. display: block;
  75. font-size: 15px;
  76. padding: 0 36px 0 36px;
  77. text-transform: capitalize;
  78. text-decoration: none;
  79. height: 36px;
  80. line-height: 36px;
  81. border-left: 1px solid #121212;
  82. border-right: 1px solid #121212;
  83. border-bottom: 1px solid #121212;
  84. }
  85. sub-categories a:hover {
  86. color: #FFFFFF;
  87. background-color: #121212;
  88. }
  89. main-categories:hover sub-categories {
  90. display: block;
  91. }
  92. sub-categories a:before{
  93. content: &#39;&#39;;
  94. }
  95. sub-categories {
  96. animation: rotateMenu 400ms ease-in-out forwards;
  97. transform-origin: top center;
  98. }
  99. @keyframes rotateMenu {
  100. 0% {
  101. transform: rotateX(-90deg)
  102. }
  103. 70% {
  104. transform: rotateX(20deg)
  105. }
  106. 100% {
  107. transform: rotateX(0deg)
  108. }
  109. }

<!-- language: lang-html -->

  1. &lt;link rel=&quot;preconnect&quot; href=&quot;https://fonts.googleapis.com&quot;&gt;
  2. &lt;link rel=&quot;preconnect&quot; href=&quot;https://fonts.gstatic.com&quot; crossorigin&gt;
  3. &lt;link href=&quot;https://fonts.googleapis.com/css2?family=IBM+Plex+Serif:wght@300;400;500&amp;family=Playfair+Display:wght@400;700&amp;display=swap&quot; rel=&quot;stylesheet&quot;&gt;
  4. &lt;nav class=&quot;menu&quot;&gt;
  5. &lt;!-- 1. --&gt;
  6. &lt;main-categories&gt;
  7. &lt;a href=&quot;#void&quot;&gt;News&lt;/a&gt;
  8. &lt;sub-categories&gt;
  9. &lt;a href=&quot;#&quot;&gt;Europe&lt;/a&gt;
  10. &lt;a href=&quot;#&quot;&gt;Asia&lt;/a&gt;
  11. &lt;a href=&quot;#&quot;&gt;Africa&lt;/a&gt;
  12. &lt;a href=&quot;#&quot;&gt;Oceania&lt;/a&gt;
  13. &lt;a href=&quot;#&quot;&gt;North America&lt;/a&gt;
  14. &lt;a href=&quot;#&quot;&gt;South America&lt;/a&gt;
  15. &lt;/sub-categories&gt;
  16. &lt;/main-categories&gt;
  17. &lt;!-- 2. --&gt;
  18. &lt;main-categories&gt;
  19. &lt;a href=&quot;#void&quot;&gt;Politics&lt;/a&gt;
  20. &lt;sub-categories&gt;
  21. &lt;a href=&quot;#&quot;&gt;Europe&lt;/a&gt;
  22. &lt;a href=&quot;#&quot;&gt;Asia&lt;/a&gt;
  23. &lt;a href=&quot;#&quot;&gt;Africa&lt;/a&gt;
  24. &lt;a href=&quot;#&quot;&gt;Oceania&lt;/a&gt;
  25. &lt;a href=&quot;#&quot;&gt;North America&lt;/a&gt;
  26. &lt;a href=&quot;#&quot;&gt;South America&lt;/a&gt;
  27. &lt;/sub-categories&gt;
  28. &lt;/main-categories&gt;
  29. &lt;!-- 3. --&gt;
  30. &lt;main-categories&gt;
  31. &lt;a href=&quot;#void&quot;&gt;Economy&lt;/a&gt;
  32. &lt;sub-categories&gt;
  33. &lt;a href=&quot;#&quot;&gt;Europe&lt;/a&gt;
  34. &lt;a href=&quot;#&quot;&gt;Asia&lt;/a&gt;
  35. &lt;a href=&quot;#&quot;&gt;Africa&lt;/a&gt;
  36. &lt;a href=&quot;#&quot;&gt;Oceania&lt;/a&gt;
  37. &lt;a href=&quot;#&quot;&gt;North America&lt;/a&gt;
  38. &lt;a href=&quot;#&quot;&gt;South America&lt;/a&gt;
  39. &lt;/sub-categories&gt;
  40. &lt;/main-categories&gt;
  41. &lt;!-- 4. --&gt;
  42. &lt;main-categories&gt;
  43. &lt;a href=&quot;#void&quot;&gt;Health&lt;/a&gt;
  44. &lt;sub-categories&gt;
  45. &lt;a href=&quot;#&quot;&gt;Europe&lt;/a&gt;
  46. &lt;a href=&quot;#&quot;&gt;Asia&lt;/a&gt;
  47. &lt;a href=&quot;#&quot;&gt;Africa&lt;/a&gt;
  48. &lt;a href=&quot;#&quot;&gt;Oceania&lt;/a&gt;
  49. &lt;a href=&quot;#&quot;&gt;North America&lt;/a&gt;
  50. &lt;a href=&quot;#&quot;&gt;South America&lt;/a&gt;
  51. &lt;/sub-categories&gt;
  52. &lt;/main-categories&gt;
  53. &lt;!-- 5. --&gt;
  54. &lt;main-categories&gt;
  55. &lt;a href=&quot;#void&quot;&gt;Education&lt;/a&gt;
  56. &lt;sub-categories&gt;
  57. &lt;a href=&quot;#&quot;&gt;Europe&lt;/a&gt;
  58. &lt;a href=&quot;#&quot;&gt;Asia&lt;/a&gt;
  59. &lt;a href=&quot;#&quot;&gt;Africa&lt;/a&gt;
  60. &lt;a href=&quot;#&quot;&gt;Oceania&lt;/a&gt;
  61. &lt;a href=&quot;#&quot;&gt;North America&lt;/a&gt;
  62. &lt;a href=&quot;#&quot;&gt;South America&lt;/a&gt;
  63. &lt;/sub-categories&gt;
  64. &lt;/main-categories&gt;
  65. &lt;!-- 6. --&gt;
  66. &lt;main-categories&gt;
  67. &lt;a href=&quot;#void&quot;&gt;Culture&lt;/a&gt;
  68. &lt;/main-categories&gt;
  69. &lt;/nav&gt;

<!-- end snippet -->

I also created a Codepen here to see it working and play around with it
https://codepen.io/familias/pen/XWygWzY

Any idea how to center the sub-categories when hovering the main-categories?

答案1

得分: 1

代码反映

  1. sub-categories {
  2. left: 50%;
  3. transform: translateX(-50%);
  4. }
  5. sub-categories {
  6. animation: rotateMenu 400ms ease-in-out forwards;
  7. transform-origin: top center;
  8. }
  9. @keyframes rotateMenu {
  10. 0% {
  11. transform: rotateX(-90deg);
  12. }
  13. 70% {
  14. transform: rotateX(20deg);
  15. }
  16. 100% {
  17. transform: rotateX(0deg);
  18. }
  19. }

这是正确的代码以设置中心位置。然而,transform: translateX(-50%);(在sub-categories中)没有生效,因为您在动画中覆盖了它...所以它应该在动画结束时应用!

解决方案

  1. sub-categories {
  2. left: 50%;
  3. }
  4. sub-categories {
  5. animation: rotateMenu 400ms ease-in-out forwards;
  6. transform-origin: top center;
  7. }
  8. @keyframes rotateMenu {
  9. 0% {
  10. transform: rotateX(-90deg) translateX(-50%); /* 在这里 */
  11. }
  12. 70% {
  13. transform: rotateX(20deg) translateX(-50%); /* 在这里 */
  14. }
  15. 100% {
  16. transform: rotateX(0deg) translateX(-50%); /* 在这里 */
  17. }
  18. }

在动画中,当您定义变换时,需要在每处都包含transformX(-50%)。这样,它将在动画期间和之后应用于元素。

示例

  1. <!-- 开始片段: js 隐藏: false 控制台: true babel: false -->
  2. <!-- 语言: lang-css -->
  3. /*** 可选设置 ***/
  4. .menu {
  5. display: flex; /* 不需要调整,但这样菜单将始终单行显示,即使在小屏幕上也是如此。 */
  6. }
  7. .menu > main-categories > a {
  8. display: flex; /* 无需调整,但这样点和<a>内的文本将始终放在一起。 */
  9. gap: 5px; /* 两个元素之间的距离可以在Flex中设置,因此点和文本之间始终有5px的距离。 */
  10. }
  11. /*** 原始设置 ***/
  12. body, html {
  13. margin: 0;
  14. padding: 0;
  15. border: 0;
  16. outline: 0;
  17. box-sizing: border-box;
  18. text-align: center;
  19. width: 100%;
  20. height: 100%;
  21. }
  22. body {
  23. background-color: #FFFFFF;
  24. font-family: 'IBM Plex Serif', serif;
  25. font-size: 16px;
  26. font-weight: 400;
  27. color: #121212;
  28. }
  29. a {
  30. color: #121212;
  31. text-decoration: none;
  32. }
  33. a:hover {
  34. color: #E5633F;
  35. }
  36. nav {
  37. grid-area: navi;
  38. display: block;
  39. text-align: center;
  40. border-bottom: 3px solid #121212;
  41. background-color: inherit;
  42. }
  43. nav {
  44. position: -webkit-sticky;
  45. position: sticky;
  46. top: 0;
  47. cursor: pointer;
  48. z-index: 8;
  49. width: 100%;
  50. }
  51. main-categories {
  52. position: relative;
  53. display: inline-block;
  54. background-color: inherit;
  55. text-transform: uppercase;
  56. height: 42px;
  57. line-height: 42px;
  58. text-align: center;
  59. padding: 0px 22px 0px 22px;
  60. }
  61. main-categories:hover {
  62. color: #E5633F;
  63. }
  64. main-categories a {
  65. position: relative;
  66. text-decoration: none;
  67. }
  68. main-categories a:hover {
  69. color: #E5633F;
  70. }
  71. main-categories a:before {
  72. content: '▪ ';
  73. }
  74. sub-categories {
  75. display: none;
  76. position: absolute;
  77. width: auto;
  78. left: 50%;
  79. /* transform: translateX(-50%); 这不起作用,因为您已经在动画中覆盖了它...所以它应该在动画结束时应用! */
  80. text-align: center;
  81. white-space: nowrap;
  82. background-color: inherit;
  83. }
  84. sub-categories a {
  85. display: block;
  86. font-size: 15px;
  87. padding: 0 36px 0 36px;
  88. text-transform: capitalize;
  89. text-decoration: none;
  90. height: 36px;
  91. line-height: 36px;
  92. border-left: 1px solid #121212;
  93. border-right: 1px solid #121212;
  94. border-bottom: 1px solid #121212;
  95. }
  96. sub-categories a:hover {
  97. color: #FFFFFF;
  98. background-color: #121212;
  99. }
  100. main-categories:hover sub-categories {
  101. display: block;
  102. }
  103. sub-categories a:before {
  104. content: '';
  105. }
  106. sub-categories {
  107. animation: rotateMenu 400ms ease-in-out forwards;
  108. transform-origin: top center;
  109. }
  110. @keyframes rotateMenu {
  111. 0% {
  112. transform: rotateX(-90deg) translateX(-50%); /* 在这里 */
  113. }
  114. 70% {
  115. transform: rotateX(20deg) translateX(-50%); /* 在这里 */
  116. }
  117. 100% {
  118. transform: rotateX(0deg) translateX(-50%); /* 在这里 */
  119. }
  120. }
  121. <!-- 语言: lang-html -->
  122. <link rel="preconnect" href="https://fonts.googleapis.com">
  123. <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  124. <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Serif:wght@300;400;500&family=Playfair+Display:wght@400;700&display=swap" rel="stylesheet">
  125. <nav class="menu">
  126. <!-- 1. -->
  127. <main-categories>
  128. <a href="#void">News</a>
  129. <sub-categories>
  130. <a href="#">Europe</a>
  131. <a href="#">Asia</a>
  132. <a href="#">Africa</a>
  133. <a href="#">Oceania</a>
  134. <a href="#">North America</a>
  135. <a href="#">South America</a>
  136. </sub-categories>
  137. </main-categories>
  138. <!-- 2. -->
  139. <main-categories>
  140. <a href="#void">Politics</a>
  141. <sub-categories>
  142. <a href="#">Europe</a>
  143. <a href="#">Asia</a>
  144. <a href="#">Africa</a>
  145. <a href="#">Oceania</a>
  146. <a href="#">North America</a>
  147. <a href="#">South America</a>
  148. </sub-categories>
  149. </main-categories>
  150. <!-- 3. -->
  151. <main-categories>
  152. <a href="#void">Economy</a>
  153. <sub-categories>
  154. <a href="#">Europe</a>
  155. <a href="#">Asia</a>
  156. <a href
  157. <details>
  158. <summary>英文:</summary>
  159. ### Reflection to your code
  160. ```css
  161. sub-categories {
  162. left: 50%;
  163. transform: translateX(-50%);
  164. }
  165. sub-categories {
  166. animation: rotateMenu 400ms ease-in-out forwards;
  167. transform-origin: top center;
  168. }
  169. @keyframes rotateMenu {
  170. 0% {
  171. transform: rotateX(-90deg);
  172. }
  173. 70% {
  174. transform: rotateX(20deg);
  175. }
  176. 100% {
  177. transform: rotateX(0deg);
  178. }
  179. }

Thats correct code to set center position. However, transform: translateX(-50%); (on sub-categories) doesn't take effect because you have overridden it with the animation... so it should be applied at the end of the animation!

Solution

  1. sub-categories {
  2. left: 50%;
  3. }
  4. sub-categories {
  5. animation: rotateMenu 400ms ease-in-out forwards;
  6. transform-origin: top center;
  7. }
  8. @keyframes rotateMenu {
  9. 0% {
  10. transform: rotateX(-90deg) translateX(-50%); /* HERE */
  11. }
  12. 70% {
  13. transform: rotateX(20deg) translateX(-50%); /* HERE */
  14. }
  15. 100% {
  16. transform: rotateX(0deg) translateX(-50%); /* HERE */
  17. }
  18. }

In the animation, when you define the transform, you need to include transformX(-50%) everywhere. This way, it will be applied to the element during and after the animation.

Example

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-css -->

  1. /*** OPTIONAL SETTINGS ***/
  2. .menu {
  3. display: flex; /* No adjustment is necessary, but this way the menu will always be single-line, even on small screens. */
  4. }
  5. .menu &gt; main-categories &gt; a {
  6. display: flex; /* No need for adjustment, but this way the dot and the text within the &lt;a&gt; will always be placed next to each other. */
  7. gap: 5px; /* The distance between the two elements can be set in Flex, so there will always be a 5px distance between the dot and the text. */
  8. }
  9. /*** ORIGINAL SETTINGS ***/
  10. body, html {
  11. margin: 0;
  12. padding: 0;
  13. border: 0;
  14. outline: 0;
  15. box-sizing: border-box;
  16. text-align: center;
  17. width: 100%;
  18. height: 100%;
  19. }
  20. body {
  21. background-color: #FFFFFF;
  22. font-family: &#39;IBM Plex Serif&#39;, serif;
  23. font-size: 16px;
  24. font-weight: 400;
  25. color: #121212;
  26. }
  27. a {
  28. color: #121212;
  29. text-decoration: none;
  30. }
  31. a:hover {
  32. color: #E5633F;
  33. }
  34. nav {
  35. grid-area: navi;
  36. display: block;
  37. text-align: center;
  38. border-bottom: 3px solid #121212;
  39. background-color: inherit;
  40. }
  41. nav {
  42. position: -webkit-sticky;
  43. position: sticky;
  44. top: 0;
  45. cursor: pointer;
  46. z-index: 8;
  47. width: 100%;
  48. }
  49. main-categories {
  50. position: relative;
  51. display: inline-block;
  52. background-color: inherit;
  53. text-transform: uppercase;
  54. height: 42px;
  55. line-height: 42px;
  56. text-align: center;
  57. padding: 0px 22px 0px 22px;
  58. }
  59. main-categories:hover {
  60. color: #E5633F;
  61. }
  62. main-categories a {
  63. position: relative;
  64. text-decoration: none;
  65. }
  66. main-categories a:hover {
  67. color: #E5633F;
  68. }
  69. main-categories a:before {
  70. content: &#39;▪ &#39;;
  71. }
  72. sub-categories {
  73. display: none;
  74. position: absolute;
  75. width: auto;
  76. left: 50%;
  77. /* transform: translateX(-50%); This doesn&#39;t take effect because you have overridden it with the animation... so it should be applied at the end of the animation! */
  78. text-align: center;
  79. white-space: nowrap;
  80. background-color: inherit;
  81. }
  82. sub-categories a {
  83. display: block;
  84. font-size: 15px;
  85. padding: 0 36px 0 36px;
  86. text-transform: capitalize;
  87. text-decoration: none;
  88. height: 36px;
  89. line-height: 36px;
  90. border-left: 1px solid #121212;
  91. border-right: 1px solid #121212;
  92. border-bottom: 1px solid #121212;
  93. }
  94. sub-categories a:hover {
  95. color: #FFFFFF;
  96. background-color: #121212;
  97. }
  98. main-categories:hover sub-categories {
  99. display: block;
  100. }
  101. sub-categories a:before {
  102. content: &#39;&#39;;
  103. }
  104. sub-categories {
  105. animation: rotateMenu 400ms ease-in-out forwards;
  106. transform-origin: top center;
  107. }
  108. @keyframes rotateMenu {
  109. 0% {
  110. transform: rotateX(-90deg) translateX(-50%); /* HERE */
  111. }
  112. 70% {
  113. transform: rotateX(20deg) translateX(-50%); /* HERE */
  114. }
  115. 100% {
  116. transform: rotateX(0deg) translateX(-50%); /* HERE */
  117. }
  118. }

<!-- language: lang-html -->

  1. &lt;link rel=&quot;preconnect&quot; href=&quot;https://fonts.googleapis.com&quot;&gt;
  2. &lt;link rel=&quot;preconnect&quot; href=&quot;https://fonts.gstatic.com&quot; crossorigin&gt;
  3. &lt;link href=&quot;https://fonts.googleapis.com/css2?family=IBM+Plex+Serif:wght@300;400;500&amp;family=Playfair+Display:wght@400;700&amp;display=swap&quot; rel=&quot;stylesheet&quot;&gt;
  4. &lt;nav class=&quot;menu&quot;&gt;
  5. &lt;!-- 1. --&gt;
  6. &lt;main-categories&gt;
  7. &lt;a href=&quot;#void&quot;&gt;News&lt;/a&gt;
  8. &lt;sub-categories&gt;
  9. &lt;a href=&quot;#&quot;&gt;Europe&lt;/a&gt;
  10. &lt;a href=&quot;#&quot;&gt;Asia&lt;/a&gt;
  11. &lt;a href=&quot;#&quot;&gt;Africa&lt;/a&gt;
  12. &lt;a href=&quot;#&quot;&gt;Oceania&lt;/a&gt;
  13. &lt;a href=&quot;#&quot;&gt;North America&lt;/a&gt;
  14. &lt;a href=&quot;#&quot;&gt;South America&lt;/a&gt;
  15. &lt;/sub-categories&gt;
  16. &lt;/main-categories&gt;
  17. &lt;!-- 2. --&gt;
  18. &lt;main-categories&gt;
  19. &lt;a href=&quot;#void&quot;&gt;Politics&lt;/a&gt;
  20. &lt;sub-categories&gt;
  21. &lt;a href=&quot;#&quot;&gt;Europe&lt;/a&gt;
  22. &lt;a href=&quot;#&quot;&gt;Asia&lt;/a&gt;
  23. &lt;a href=&quot;#&quot;&gt;Africa&lt;/a&gt;
  24. &lt;a href=&quot;#&quot;&gt;Oceania&lt;/a&gt;
  25. &lt;a href=&quot;#&quot;&gt;North America&lt;/a&gt;
  26. &lt;a href=&quot;#&quot;&gt;South America&lt;/a&gt;
  27. &lt;/sub-categories&gt;
  28. &lt;/main-categories&gt;
  29. &lt;!-- 3. --&gt;
  30. &lt;main-categories&gt;
  31. &lt;a href=&quot;#void&quot;&gt;Economy&lt;/a&gt;
  32. &lt;sub-categories&gt;
  33. &lt;a href=&quot;#&quot;&gt;Europe&lt;/a&gt;
  34. &lt;a href=&quot;#&quot;&gt;Asia&lt;/a&gt;
  35. &lt;a href=&quot;#&quot;&gt;Africa&lt;/a&gt;
  36. &lt;a href=&quot;#&quot;&gt;Oceania&lt;/a&gt;
  37. &lt;a href=&quot;#&quot;&gt;North America&lt;/a&gt;
  38. &lt;a href=&quot;#&quot;&gt;South America&lt;/a&gt;
  39. &lt;/sub-categories&gt;
  40. &lt;/main-categories&gt;
  41. &lt;!-- 4. --&gt;
  42. &lt;main-categories&gt;
  43. &lt;a href=&quot;#void&quot;&gt;Health&lt;/a&gt;
  44. &lt;sub-categories&gt;
  45. &lt;a href=&quot;#&quot;&gt;Europe&lt;/a&gt;
  46. &lt;a href=&quot;#&quot;&gt;Asia&lt;/a&gt;
  47. &lt;a href=&quot;#&quot;&gt;Africa&lt;/a&gt;
  48. &lt;a href=&quot;#&quot;&gt;Oceania&lt;/a&gt;
  49. &lt;a href=&quot;#&quot;&gt;North America&lt;/a&gt;
  50. &lt;a href=&quot;#&quot;&gt;South America&lt;/a&gt;
  51. &lt;/sub-categories&gt;
  52. &lt;/main-categories&gt;
  53. &lt;!-- 5. --&gt;
  54. &lt;main-categories&gt;
  55. &lt;a href=&quot;#void&quot;&gt;Education&lt;/a&gt;
  56. &lt;sub-categories&gt;
  57. &lt;a href=&quot;#&quot;&gt;Europe&lt;/a&gt;
  58. &lt;a href=&quot;#&quot;&gt;Asia&lt;/a&gt;
  59. &lt;a href=&quot;#&quot;&gt;Africa&lt;/a&gt;
  60. &lt;a href=&quot;#&quot;&gt;Oceania&lt;/a&gt;
  61. &lt;a href=&quot;#&quot;&gt;North America&lt;/a&gt;
  62. &lt;a href=&quot;#&quot;&gt;South America&lt;/a&gt;
  63. &lt;/sub-categories&gt;
  64. &lt;/main-categories&gt;
  65. &lt;!-- 6. --&gt;
  66. &lt;main-categories&gt;
  67. &lt;a href=&quot;#void&quot;&gt;Culture&lt;/a&gt;
  68. &lt;/main-categories&gt;
  69. &lt;/nav&gt;

<!-- end snippet -->

huangapple
  • 本文由 发表于 2023年7月3日 23:07:40
  • 转载请务必保留本文链接:https://go.coder-hub.com/76606003.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定