Задать вопрос
Ответы пользователя по тегу CSS
  • Как настроить автоматическую высоту вкладок через js?

    @mUchenik Автор вопроса
    Всем спасибо.
    Решил я свою задачу.
    Чутка со скриптом ошибся.
    Внимательно проверив, нашел и исправил ошибку.
    На всякий случай, выкладываю код:
    "use strict";
      //Auto adjust height
      $(".about__tabs-content-wrap").css("height", 0);
      var autoHeight = function () {
        
        setTimeout(function () {
          var tabContentWrap = $(".about__tabs-content-wrap"),
            tabHeight = $(".about__tab-nav").outerHeight(),
            formActiveHeight = $(".tab-content.active").outerHeight(),
            totalHeight = parseInt(tabHeight + formActiveHeight + 90);
    
          tabContentWrap.css("height", totalHeight);
    
          $(window).resize(function () {
            var tabContentWrap = $(".about__tabs-content-wrap"),
              tabHeight = $(".about__tab-nav").outerHeight(),
              formActiveHeight = $(".tab-content.active").outerHeight(),
              totalHeight = parseInt(tabHeight + formActiveHeight + 90);
    
            tabContentWrap.css("height", totalHeight);
          });
        }, 100);
      };
    
      autoHeight();
    
      // Click tab menu
      $(".tabsmenu a").on("click", function (event) {
        var $this = $(this),
          tab = $this.data("tab");
    
        $(".tab-content").addClass("");
    
        $(".tab-content").removeClass("active");
    
        $(".tabsmenu li").removeClass("active");
    
        $this.closest("li").addClass("active");
    
        $this
          .closest(".about__tabs")
          .find('.tab-content[data-tab-content="' + tab + '"]')
          .removeClass("test")
          .addClass("active");
    
    
        autoHeight();
        event.preventDefault();
      });
    Ответ написан
    Комментировать
  • Картинка не входит полностью, как поправить?

    @mUchenik Автор вопроса
    Иван Татауш , Ankhena W
    Спасибо за ваши советы.
    Но нужного результата увы не узрел...
    Вот вид полной картинки размеры 1200*820:
    35dc9adc40ab45c780d903e82295e164.jpg
    И мне хотелось бы, что бы при загрузке страницы, эта картинка была видна полностью и по всему экрану.
    А сейчас по факту, видна верхняя часть картинки, и остальная часть закрыта футером.
    Ответ написан
  • Как мне ускорить загрузку сайта?

    @mUchenik Автор вопроса
    PrAw
    С какого-то хрена из lab.min.js грузится еще экземпляр jQuery v1.12.4. В то время как первым загружается 1.7.2, определитесь - какой из них нужен.

    Если мне память не изменяет, то 1.7.2 - эт я подключал маску ввода телефонного номера,
    jQuery v1.12.4. - шел с темой
    Получается, что 1,7,2 можно (если это возможно) в отложеную загрузку сунуть...
    Заодно оттуда же грузится пачка jQuery плагинов, не проще их объединить в компактный сжатый файл?

    Я только ЗА, но как это реализовать, не представляю...
    Ответ написан
  • Как уменьшить количество контента в слайдере?

    @mUchenik Автор вопроса
    Я не волшебник, а только учусь, поэтому строго не удите плиз...
    В попытках найти как выводится эта каруселька, нашел несколько упоминаний, думаю, что наиболее важный эт fron-page.php
    /* LATEST NEWS */
    	$zerif_latestnews_show = get_theme_mod('zerif_latestnews_show');
    
    	if( isset($zerif_latestnews_show) && $zerif_latestnews_show != 1 ):
    
    		get_template_part( 'sections/latest_news' );
    
    	endif;

    Но так же есть упоминание в файле js:
    jQuery(window).load(zerif_home_latest_news);jQuery(window).resize(zerif_home_latest_news);function zerif_home_latest_news(){if(jQuery('#carousel-homepage-latestnews').length>0){jQuery('#carousel-homepage-latestnews div.item').height('auto');if(isMobile.any()||(!isMobile.any()&&jQuery('.container').outerWidth()>768)){if(jQuery('#carousel-homepage-latestnews div.item').length<2){jQuery('#carousel-homepage-latestnews > a').css('display','none');}var maxheight=0;jQuery('#carousel-homepage-latestnews div.item').each(function(){if(jQuery(this).height()>maxheight){maxheight=jQuery(this).height();}});jQuery('#carousel-homepage-latestnews div.item').height(maxheight);}}}jQuery(document).ready(function(){if(document.createElement("input").placeholder==undefined)


    И в CSS:
    .latest-news{padding-bottom:66px;padding-top:100px;background:#FFFFFF;}
    .carousel-inner{}
    #carousel-homepage-latestnews .item{height:auto;}
    .latesnews-content p,
    .latesnews-content{font-size:14px;line-height:18px;color:#777777;}
    #carousel-homepage-latestnews .carousel-inner .item .latestnews-title{margin-bottom:15px;color:#404040;position:relative;display:inline-block;text-transform:uppercase;margin-bottom:30px;font-weight:bold;font-size:17px;float:none;width:auto;margin-top:15px;}
    #carousel-homepage-latestnews .carousel-inner .item .latestnews-title a{text-transform:uppercase;color:#404040;font-weight:700;display:block;}
    #carousel-homepage-latestnews .item .latestnews-box .latestnews-title a:before{position:absolute;margin:auto;z-index:1;content:"";width:75%;height:2px;background:#e96656;bottom:-9px;left:12.5%;}
    #carousel-homepage-latestnews .item .latestnews-box:nth-child(4n+1) .latestnews-title a:before{background:#e96656;}
    #carousel-homepage-latestnews .item .latestnews-box:nth-child(4n+2) .latestnews-title a:before{background:#34d293;}
    #carousel-homepage-latestnews .item .latestnews-box:nth-child(4n+3) .latestnews-title a:before{background:#3ab0e2;}
    #carousel-homepage-latestnews .item .latestnews-box:nth-child(4n) .latestnews-title a:before{background:#f7d861;}
    #carousel-homepage-latestnews .item .latestnews-box .latestnews-img .latestnews-img-a{display:block;}
    #carousel-homepage-latestnews{margin:0 30px;}
    #carousel-homepage-latestnews .carousel-control{width:45px;background:none;}
    .carousel-control.left{margin-left:-45px;}
    .carousel-control.right{margin-right:-45px;}
    #carousel-homepage-latestnews .glyphicon-chevron-left:before{content:"";background:url(images/left-arrow.png) no-repeat center center;width:30px;height:30px;float:left;}
    #carousel-homepage-latestnews .glyphicon-chevron-right:before{content:"";background:url(images/right-arrow.png) no-repeat center center;width:30px;height:30px;float:left;}
    #carousel-homepage-latestnews{}


    В этих кодах (кроме css) я не смог найти каким образом выводится эта карусель... Помогите разобраться пожалуйста.
    Ответ написан
    Комментировать