当浏览器的大小(宽度)在两个特定的数字之间时,我如何使用jQuery、JS、CSS,无论用什么方法改变字体大小值的百分比。
埃克斯。
<div class="Fsize">Sample text<div>
<style>
//a sample size, lets say it can be anything
font-size: 100px;
</style>
<script>
//what should be here to change font-size to for example 30% of it
我已经将行高设置为20像素,就像这样line-height: 20px。当我改变其父div的大小时,我希望行高也相应地改变。 在下面的示例中,您可以看到,当我们更改parent div的大小时,<pre>标签的line-height不同。即使它的value从不改变。 function settextpos(){
let top = ($("#video-div").outerHeight() * 10) / 200;
let left = ($("#video-div").outerWidth() * 20) /