我的 jquery 有什么问题?我想根据屏幕大小使我的 div 更大,并且有很多很好的例子,但仍然没有成功。
.picLeft {
border: 4px solid black;
border-radius: 15px;
width: 130px !important;-------> I need to change this
height: 130px;-------> I need to change this
text-align: center;
background-color: white;
margin: 10px !important;
padding: 0px;
float: left;
}
**EDIT TWO DIVS LIKE THAT**
var height = window.innerHeight;
var width = window.innerWidth;
console.log("height------->" +height);
console.log("width-------->" +width);
// <div class="ui-block-a picLeft" id="leftDiv">
//$("#leftDiv").css("width","300 !important"); NOT working
$(".picLeft").css("width","300 !important"); //NOT Working
<div class="ui-grid-a" style="background-color:black">
<div class="ui-block-a picLeft" id="leftDiv">
<img src="images/nk100x100.jpg" data-theme="c"
id="pictureId" />
</div>
<div class="ui-block-b picRight">
<img src="images/th100x100.jpg" data-theme="c" id="pictureId2" />
</div>
</div>
谢谢!萨米人