【问题标题】:How to implement theme to html?如何将主题实现为 html?
【发布时间】:2020-10-14 19:47:43
【问题描述】:

好的,所以我是 100% 的编程新手。问题格式也可能是错误的。 问题:html 上的主题? 仍然是 html 的初学者。希望它至少在我所学的情况下看起来在美学上令人赏心悦目。还没有 CSS 知识。我一直在寻找我想放在我的页面上的任何东西(表情符号)。 我搜索了谷歌并做了写的,但它仍然没有显示主题。 好的,这里是代码,你可以看到,稍后我会添加更多东西(我知道这对你们来说没什么):

  
    
     银河
       

欢迎来到我奇怪的居所 🦋



这是我现在的一个 html 示例,
玩得开心。:)

正文>

标签: html css colors themes background-color


【解决方案1】:

为了向您的 HTML 页面添加样式,您可以使用 css(文件扩展名为 .css,例如 styles.css)。要使样式在您的 html 页面上可见,请在 head 部分中包含 <link rel="stylesheet" href="styles.css"/>。例如,在 css 文件中,您可以包括:

h3 {
    color: #f7cac9;
}

然后,添加链接 rel 后,您的 html 页面中的 h3 元素将变为粉红色。希望这可以帮助!或者,您可以在 html 页面中添加标签。

这是一个将 css 添加到 html 页面的示例。通过添加 .coder {background: green},背景颜色变为绿色:

.coder {
  background-color: green;
}
<html>
  <head>
    <meta charset=“UTF-8”>
     <meta name="viewport" content="width=device-width, initial-scale=1">
      <meta name="theme-color" content="#f7cac9">
       <title>Galaxia
       </title>
  </head>
    <body>

  <h3 style = "position:absolute; right:150px; top:-10px; background-color:pink;">
    Welcome to my weird abode &#x1F98B;
  </h3>
  <br>
  <br>
  <!-- added two br tags because otherwise heading and paragraph overlap -->
  
  <div class="coder">
    <p>This is a html example from me for now,
        <br>
        have fun.:) </p>
    </div>

</body>
</html>

【讨论】:

    【解决方案2】:

    喜欢其他人的帖子。

    • HTML - 是一种标记语言。你会对浏览器说:嘿,这是一段……&lt;p&gt;This is a paragraph&lt;/p&gt;
    • CSS - 你会让事情看起来更好。您可以更改所有颜色、背景、字体、大小、边距...

    w3schools.com 是一个可以找到快速教程的地方,也是一个了解的好地方。

    它很有名,很多人都在使用它。

    希望你继续努力。

    第一步是最难的一步!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-07-07
      • 2018-01-30
      相关资源
      最近更新 更多