如何在手机上制作按钮

时间:2017-01-30 15:04:49

标签: php jquery html css

大家好日子。

刚刚开始在公司工作,这让我有责任优化他们的网站(尼日利亚 - 朋友(点)com / staging.academix),我已经逐渐做了,而不是全部精通PHP,HTML和CSS。但是,我可以自信地阅读并理解其中的一些内容。因此;

  1. 我一直试图将所有内容集中在首页图片横幅上
  2. 显示或制作一个特定按钮" Academix如何让您受益 出现在最大宽度:380px 的移动设备上,但没有成功让我感到困惑。
  3. 我已经搜索了整个CSS,无法解决问题。因此,我呼救。从我找到的基础文件夹中查看了index.html,上面提到的按钮是循环的,我不明白。

    这是索引代码:

    <div class="col-sm-12 col-xs-10 col-centered">
    
      <?php if(!isset($_SESSION["acc_identifier"])){ ?>
        <!--
          <div class="col-sm-4 col-centered">
            <a href="<?php echo $URLMAIN; ?>/access/signup.html">
              <div id="fb-login" class="social-login">
                <div class="social-text">Sign up for free</div>
              </div>
            </a>
          </div>
        -->
    
        <div class="col-sm-6 col-centered">
          <a href="<?php echo $URLMAIN; ?>/about/benefits.html">
            <div id="yahoo-login" class="social-login">
              <div class="social-text">How <?php echo $web_shortName; ?> can benefit you</div>
            </div>
          </a>
        </div>
    
        <div class="col-sm-6 col-centered">
          <a href="<?php echo $URLMAIN; ?>/access/host.html">
            <div id="g-login" class="social-login">
              <div class="social-text">Host your journal on <?php echo $web_shortName; ?></div>
            </div>
          </a>
        </div>
    
      <?php }else{ ?>
    
        <div class="col-sm-6 col-centered">
          <a href="<?php echo $URLMAIN; ?>/about/benefits.html">
            <div id="yahoo-login" class="social-login">
              <div class="social-text">How <?php echo $web_shortName; ?> can benefit you</div>
            </div>
          </a>
        </div>
    
        <div class="col-sm-6 col-centered">
          <a href="<?php echo $URLMAIN; ?>/access/host.html">
            <div id="g-login" class="social-login">
              <div class="social-text">Host your journal on <?php echo $web_shortName; ?></div>
            </div>
          </a>
        </div>
      <?php } ?>
    
    </div>
    

    我无法在这里粘贴所有index.html代码,因为它很长且很长,当我尝试时生成错误格式,这是混合php和html,其中PHP启动index.html。 CSS文件也是如此。

1 个答案:

答案 0 :(得分:0)

@media (min-width: 380px){
  #yahoo-login .social-text {
    display: none;
  }
}

OR

@media (max-width: 380px){
  #yahoo-login .social-text {
    display: block;
  }
}