我需要动态设置垂直布局的高度。我的页面有一个高度100 My的标题图像,高度26 My的标签是主要内容。我已经用App.controller.js编写了以下代码。不起作用
// tab_layt is the id of vertical layout var thisView = this.getView().byId("tab_layt"); var height = jQuery(window).height() - (jQuery(".header").height() + jQuery(".tab").height()); thisVi
伙计,我从字面上看了几十个看起来完全一样的questions...and,这些解决方案都不起作用。
我的代码并不是很复杂--我正在动态创建一个DIV,将一个id与它关联起来,给它一个高度,然后添加DOM元素:
S = document.createElement('div'); S.setAttribute('id','viewbg'); var pageHeight = getVpHeight(); $('#viewbg').css('height', pageHeight + 'px'); do
我使用react-infinite from (),在用户滚动时加载数据。
这是一个移动应用程序,容器高度是动态的(aprox.:60 an ),每个项目的高度为46 an。
我需要将containerHeight和elementHeight传递给元素。我怎么弄到它们?
我不想避免使用JQuery,即:
var height = $(this.refs.transactionsDiv.getDOMNode()).
谢谢!
我目前正在尝试如何通过动态查找div中最长的p元素的高度来设置该div中所有兄弟p元素的高度,而不设置最大高度,代码来自
我想动态地将高度设置为最长的p,因为我不知道最长p的高度
以下是代码
$(document).ready(function() {
setHeight('.col');
});
//global variable, this will store the highest height value
var maxHeight = 100;
function setHeight(col) {
//Get all the element w
我正试着设置成对的div的高度相同。
<div class="item ">
Some text
</div>
<div class="item right">
Some text
</div>
<div class="item ">
Some text<br/>Some text<br/>Some text<br/>Some text<br/>Some text
</div>
<div class="item r