小编Ich*_*ban的帖子

根据容器宽度设置容器高度并乘以常量

我试图根据容器的宽度乘以.75来设置容器的高度.

我想出了这个,但不知道我哪里出错了,因为它不起作用:

$('#slideContent').load(function() {
            var wide = ('#slideContent').width()
          $(this).css('height', $(this).width( wide * 0.75 ));
        });
Run Code Online (Sandbox Code Playgroud)

有什么建议?

谢谢

css jquery height equation width

1
推荐指数
1
解决办法
3328
查看次数

标签 统计

css ×1

equation ×1

height ×1

jquery ×1

width ×1