没有展示但是同事的雕文具有相同的代码

问题描述 投票:0回答:1

我的同事给我发了这个确切的代码,并在他的页面上显示了图标。在我的页面上他们没有。但这很奇怪,因为它的代码相同。

<!DOCTYPE html>
<html>

<head>
  <link rel="stylesheet"  href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
</head>

<body>
  <span class="glyphicon glyphicon-home"></span>
</body>

</html>
html css glyphicons
1个回答
0
投票

您当前的代码有一些无效的空格字符,请尝试直接从站点替换(复制粘贴)以避免此类错误。

<!DOCTYPE html>
<html>

<head>
  <!-- <link rel="stylesheet"  href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> -->
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
</head>

<body>
  <!-- won't work -->
  <span class="glyphicon glyphicon-home"></span>
    <span class="glyphicon glyphicon-envelope"></span>
    <!-- works fine -->
    <span class="glyphicon glyphicon-home"></span>
</body>

</html>
© www.soinside.com 2019 - 2024. All rights reserved.