我的对象元素不会显示100%的高度

时间:2018-04-26 11:28:26

标签: html css

我正在制作手风琴菜单,我在对象元素中添加 PDF。但是,我无法将对象显示其高度的100%,因此难以使用。

我想要的是知道如何在对象div中创建PDF文件以显示它的全高。我记得有类似问题的页脚..

感谢。

if( jQuery(".toggle .toggle-title").hasClass('active') ){
  jQuery(".toggle .toggle-title.active").closest('.toggle').find('.toggle-inner').show();
}

jQuery(".toggle .toggle-title").click(function(){
  if( jQuery(this).hasClass('active') ){
    jQuery(this).removeClass("active").closest('.toggle').find('.toggle-inner').slideUp(200);
  } else {	 
    jQuery(this).addClass("active").closest('.toggle').find('.toggle-inner').slideDown(200);
  } 
});
body {
  color: #4B4B4B;
  font-family: ARIMO;
}
body a {
  cursor: pointer;
  color: #4B4B4B;
  text-decoration: none;
}
body section {
  margin-bottom: 90px;
}
body section h1 {
  text-transform: uppercase;
  text-align: center;
  font-weight: normal;
  letter-spacing: 10px;
  font-size: 25px;
  line-height: 1.5;
}

object{
  width: 100%;
  height: 100%;
  display: block;
  position: relative;
  min-height: 100%;
}

/* Styles for Accordion */

.toggle{
  background: #eee;
  border-top: solid 1px #3b7c8e;
  margin-bottom: 50px;
  width: 80%;
  height: 100%;
}

.toggle .toggle-title {
  position: relative;
  display: block;
  margin-bottom: 6px;
}
.toggle .toggle-title h3 {
  font-size: 20px;
  margin: 0px;
  line-height: 1;
  cursor: pointer;
  font-weight: 200;
}
.toggle .toggle-inner {
  padding: 7px 25px 10px 25px;
  display: none;
  margin: -7px 0 6px;
  max-width: 100%;
  max-height: 100%;
  min-height: 100%;
}
.toggle .toggle-inner div {
  max-width: 100%;
  max-height: 100%;
  min-height: 100%;
}
.toggle .toggle-title{
  display: block;
  padding: 25px 25px 14px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="toggle">
  <div class="toggle-title">
    <h3>
      <div class="title-name">Example title</div>
    </h3>
    <p>Example call for paper</p>
    <p>Astronomers face an embarrassing conundrum: they don't know what 95% of the universe is made of. Atoms, which form everything we see around us, only account for a measly 5%. Over the past 80 years it has become clear that the substantial remainder is comprised of two shadowy entities – dark matter and dark energy. The former, first discovered in 1933, acts as an invisible glue, binding galaxies and galaxy clusters together. Unveiled in 1998, the latter is pushing the universe's expansion to ever greater speeds. Astronomers are closing.</p>
  </div>
  <div class="toggle-inner">
    <object height="100" data="http://prototypes.infopro-insight.com/test/MW/call_for_papers.pdf"></object>
  </div>
</div><!-- END OF TOGGLE -->

0 个答案:

没有答案