Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/redis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何在导航栏中加入字体和透明度?_Html_Css - Fatal编程技术网

Html 如何在导航栏中加入字体和透明度?

Html 如何在导航栏中加入字体和透明度?,html,css,Html,Css,我必须从头开始做一个项目的网页,我对HTML一无所知。我刚开始创建我的导航栏。如何将字体更改为centhury哥特式?以及如何为背景添加透明度。如果您能告诉我如何将“主页”更改为将您链接到主页的徽标,那将非常有帮助。提前非常感谢您对任何人的帮助!!!到目前为止,我有: <!DOCTYPE html> <html> <head> <style> ul { list-style-type: none;

我必须从头开始做一个项目的网页,我对HTML一无所知。我刚开始创建我的导航栏。如何将字体更改为centhury哥特式?以及如何为背景添加透明度。如果您能告诉我如何将“主页”更改为将您链接到主页的徽标,那将非常有帮助。提前非常感谢您对任何人的帮助!!!到目前为止,我有:

<!DOCTYPE html>
<html>
  <head>
    <style>
      ul {
          list-style-type: none;
          margin: 0;
          padding: 0;
          overflow: hidden;
          border: 1px solid #e7e7e7;
          background-color: grey;
      }
      li {
          float: left;
      }
      li a {
          display: block;
          color: white;
          text-align: center;
          padding: 34px 85px;
          text-decoration: none;
      }
      li a:hover:not(.active) {
          background-color: #grey;
      }
      li a.active {
          color: white;
          background-color: #4CAF50;
      }
    </style>
  </head>
  <body>
    <ul>
      <li><a class="active" href="#home">Home</a></li>
      <li><a href="#Social">Social</a></li>
      <li><a href="#Comercial">Comercial</a></li>
      <li><a href="#Sobre el fotógrafo">Sobre el fotógrafo</a></li>
      <li><a href="#Contacto">Contacto</a></li>
    </ul>
  </body>
</html>

保险商实验室{
列表样式类型:无;
保证金:0;
填充:0;
溢出:隐藏;
边框:1px实心#e7e7e7;
背景颜色:灰色;
}
李{
浮动:左;
}
李阿{
显示:块;
颜色:白色;
文本对齐:居中;
填充:34px 85px;
文字装饰:无;
}
li a:悬停:未(.active){
背景色:#灰色;
}
李安:很活跃{
颜色:白色;
背景色:#4CAF50;
}

要将字体更改为世纪哥特式,请执行以下操作:

font-family: "Century Gothic", CenturyGothic, AppleGothic, sans-serif;
要使主页按钮成为图像,您可以使用:

<img src="Image.png" height="" width="">

,我还没有整理好您的代码,但这可能会让您领先。

字体系列,字体。和透明颜色使用rgba。rgba(255、255、255、0.5)为白色,50%可见。
background-color: rgba(119, 119, 119, 0.5);