[英]How to set the screen height and width by %(percentage) in javascript
i am using one plugin for slider. 我正在为滑块使用一个插件。 That slider contains H & W is mentioned by pixel.
包含H&W的滑块以像素表示。 I want that in %
我想要%
$("#section4").awShowcase(
{
content_width: 1000,
content_height: 300,
}
});
They are mentioned by like this. 像这样被提及。 how to change this by % - Percentage.
如何通过%-百分比更改此值。
I want that for responsive model 我想要用于响应模型
$("#section4").awShowcase(
{
content_width: 100%,
content_height: 30%,
}
});
Is this what you looking for? 这是您要找的东西吗?
Try to use: 尝试使用:
$("#section4").awShowcase({
content_width: '50%',
content_height: '50%',
//} // Remove this
});
Also, you're having redundant }
in your code. 另外,您的代码中有多余的
}
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.