我试图根据容器的宽度乘以.75来设置容器的高度.
我想出了这个,但不知道我哪里出错了,因为它不起作用:
$('#slideContent').load(function() {
var wide = ('#slideContent').width()
$(this).css('height', $(this).width( wide * 0.75 ));
});
Run Code Online (Sandbox Code Playgroud)
有什么建议?
谢谢