Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
幻灯片和标题以及 jssor 滑块的所有元素都以像素为单位进行测量。结果,滑块在更大分辨率的屏幕上看起来很奇怪。我如何以百分比提及 jssor 滑块的高度和宽度?
您可以使用 $ScaleWidth(with) 方法将滑块缩放到任意大小。
<script> //scale jssor slider to 70% width of parent container jssor_slider1.$ScaleWidth(parentWidth * 0.7); </script>