【问题标题】:How to make the div responsive如何使 div 响应式
【发布时间】:2014-06-05 05:26:24
【问题描述】:

我正在使用 cutomizeit 主题在 wordpress 中处理这个 site。一切都是响应式的,直到我自定义将其添加到我的主页中

<div class="hilight-hometext">
<div id="hilightbox">
<div class="hilightbox-text">
<h2>At Salisbury we want everyone to understand their landscaping choices</h2>
<p>Our latest landscaping innovation is our Outdoor Vision questionnaire. We’ll guide you through a set of questions that will help you realize what you want out of your yard.    </p>

</div>
<!-- end tier 2 text -->
<div class="hilightbox-action">

<a class="myButton" href="resources/the-outdoor-vision-tool/">GET STARTED</a>

<p>Your Outdoor Vision</p>

</div>
<!-- end tier 2 action -->
</div></div>

这个 div 没有响应。我怎样才能让它响应,以便一切顺利。请帮忙!!谢谢!!

【问题讨论】:

标签: html css wordpress responsive-design styles


【解决方案1】:

添加CSS max-width/min-width & max-height/min-height!

【讨论】:

  • cud 你请解释一下具体怎么做
  • #hilightbox{background: url(../img/action-bg.jpg) !important;宽度:100%!重要;最小宽度:900px;边距:20px 自动!重要;溢出:隐藏;}
【解决方案2】:

更改span4 fp-two class css @media 并根据媒体更改图像宽度。

.span4.fp-two{
  float : left;
}

【讨论】:

  • 对不起,我没有得到你。你能解释一下吗!!
  • 更改 .sapn.fp-two 类的 float css。默认情况下 float:none 适用于此类。并且中心 div 图像宽度太长,因此将第三个 div 推到底部。使用 '%' 而不是 'px' 更改图像
  • 我把这个添加到我的css文件中了吗? .span4.fp-two{ 浮动:左; }
  • 首先通过 Inspect Element 检查它,如果你没问题添加到你的@media css 文件中
  • 我不知道如何使它工作..我是网络开发的新手
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2016-12-19
  • 1970-01-01
  • 2015-07-24
  • 1970-01-01
  • 2017-06-16
  • 2019-07-18
  • 1970-01-01
相关资源
最近更新 更多