【问题标题】:I can't set the navbar of a template with bootstrap [closed]我无法使用引导程序设置模板的导航栏 [关闭]
【发布时间】:2017-01-16 12:03:13
【问题描述】:

我正在更改网站。我是一名平面设计师,我在编码方面有点笨。

This is the website我在说。我需要修复导航栏并使其更高(我需要徽标才能完全适应它)。

我在谷歌上搜索,试图找到解决方案,我阅读了很多东西,我已经尝试更改 Bootstrap 或 CSS 文件中的某些内容,但没有任何反应。

编辑:

<header id="topNav" style="height: 81px;"><!-- remove class="topHead" if no topHead used! -->
        <div class="container">

【问题讨论】:

  • 请为这个问题添加一些代码,或工作 sn-p
  • 这看起来不像是引导标头。

标签: html css twitter-bootstrap bootstrap-modal


【解决方案1】:

将徽标图像样式更改为并测试

style="max-height:100%; width:auto; "

在文件目录/view/assets/js/scripts.js的下面一行 更改行高:值;

jQuery('header#topNav a.logo').stop().animate({ 'line-height':'50px', 'margin-top':'0'},400);

【讨论】:

  • 这可能是一个解决方案,但是这样的标志太小了..
  • 答案已更新。立即查看
【解决方案2】:

@onlinewebsite,你给了我一个提示。

function topMain() {
    var _scrollTop = jQuery(document).scrollTop();

    if(window.topNavSmall === false && _scrollTop > 0) {

        jQuery('header#topNav div.nav-main-collapse').addClass('topFix');
        jQuery('#topNav').stop().animate({ 'height':'95px'},400);
        jQuery('header#topNav div.nav-main-collapse').stop().animate({ 'margin-top':'6px'},400);
        jQuery('header#topNav button').stop().animate({ 'margin-top':'0'},100);
        jQuery('header#topNav a.logo').stop().animate({ 'margin-top':'-10px'},400);

        if(jQuery('#header_shadow').length > 0) {
            jQuery('#header_shadow').stop().animate({ 'top':window._headHeightSmall + 'px'},400);/* just a little visible */
        }

        window.topNavSmall = true;
    } 

    if(window.topNavSmall === true && _scrollTop < 3) {
        jQuery('header#topNav div.nav-main-collapse').removeClass('topFix');
        jQuery('#topNav').stop().animate({ 'height':'105px'},400);
        jQuery('header#topNav div.nav-main-collapse').stop().animate({ 'margin-top':'16px'},400);
        jQuery('header#topNav button').stop().animate({ 'margin-top':'8px'},100);
        jQuery('header#topNav a.logo').stop().animate({ 'line-height':'105px', 'margin-top':'0'},400);

        if(jQuery('#header_shadow').length > 0) {
            jQuery('#header_shadow').stop().animate({ 'top':window._headHeight + 'px'},400);
        }

        window.topNavSmall = false;
    }
}

现在可以完美运行了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-12-12
    • 1970-01-01
    • 2018-03-17
    • 2015-06-19
    • 2017-12-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多