css - 未应用英雄单位样式

标签 css twitter-bootstrap

我正在使用 bootstrap 开始将 psd 转换为 html,但我的英雄单元没有获得其默认样式

 <html lang="en">
    <head>
        <meta name="viewport" content="width=device-width, initial-scale=1">
    
        
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.3.7/cerulean/bootstrap.css" >
    
    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    
    <!-- Optional theme -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
    
    <!-- Latest compiled and minified JavaScript -->
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
        
        </head>
        
        
        <body>
        
        
            <div class="hero-unit">
      <h1>We build well desgined websites</h1>
      <p>Class aptent taciti sociosqu ad litora torquent per conubia nostra.</p>
      <p>
        <a class="btn btn-primary btn-large">
          Get Started
        </a>
          
          <a class="btn btn-primary btn-large">
        Learn More
        </a>
      </p>
    </div>
            
         
        
        </body>
    </html>

你会在图像中看到它获得了图像的风格,但是没有人知道为什么是英雄单位?

enter image description here

最佳答案

如果您使用的是 twitter bootstrap 3,则应使用 jumbotron 而不是 hero-unit

  <div class="jumbotron">

https://getbootstrap.com/docs/3.3/css/

https://getbootstrap.com/docs/3.3/components/#jumbotron

关于css - 未应用英雄单位样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47286033/

相关文章:

IE8 的 CSS 问题

css - 为什么 "overflow: hidden"清除一个 float ?

javascript - 如何编写javascript来组合多个过滤器

html - 如何修复 ipad air 中的 "Div background color not changing from white to transparent"(Safari 浏览器)

jquery - Bootstrap 网格重置大小

python - django 从帖子中删除对象( Bootstrap )

css - 如何使用简单的 css、js 更改输入闪烁插入符样式

css - Bootstrap Timeline - 跨线面板

javascript - Bootstrap 折叠切换菜单问题与 WordPress 菜单

css - 尝试将 bootstrap3 工具提示与响应式实用程序一起使用