Javascript 鼠标输入时调整文本大小
我有下一个小提琴,我想调整文本的大小,而不是图像 引导Javascript 鼠标输入时调整文本大小,javascript,jquery,css,twitter-bootstrap,Javascript,Jquery,Css,Twitter Bootstrap,我有下一个小提琴,我想调整文本的大小,而不是图像 引导 <div class="row"> <div class="col-md-4 header" ><img src="http://www.mandroid.in/demo/srems/images/news_image_01.jpg" /></div> <div class="col-md-4 header" ><img src="http://www
<div class="row">
<div class="col-md-4 header" ><img src="http://www.mandroid.in/demo/srems/images/news_image_01.jpg" /></div>
<div class="col-md-4 header" ><img src="http://www.mandroid.in/demo/srems/images/news_image_01.jpg" /></div>
<div class="col-md-4 header" ><img src="http://www.mandroid.in/demo/srems/images/news_image_01.jpg" /></div>
<div class="col-md-4 header" ><img src="http://www.mandroid.in/demo/srems/images/news_image_01.jpg" /></div>
</div>
<div class="row text">
<div class="col-md-4 ">text</div>
<div class="col-md-4 ">text</div>
<div class="col-md-4 ">text</div>
<div class="col-md-4 ">text</div>
</div>
JS:
所以作为图像,我可以改变图像的大小,但文本不会变大。非常感谢您的帮助。关于使用
fontSize
更改文本大小。因此,将height
替换为fontSize
修改“.text div”
类似的事件
$(".text div").mouseleave(function () {
$(this).stop().animate({
fontSize: "50px"
}, 600);
});
$(".text div").mouseenter(function () {
$(this).stop().animate({
fontSize: "100px"
}, 600);
});
请参阅。使用
fontSize
更改文本的大小。因此,将height
替换为fontSize
修改“.text div”
类似的事件
$(".text div").mouseleave(function () {
$(this).stop().animate({
fontSize: "50px"
}, 600);
});
$(".text div").mouseenter(function () {
$(this).stop().animate({
fontSize: "100px"
}, 600);
});
请参阅。,除了进入div之外,没有其他方法可以变得更大?所以文本无法从中传出?你是什么意思?你能再解释一点吗?除了进入div,没有办法变得更大?所以文本无法从中传出?你是什么意思?你能再解释一下吗?
$(".text div").mouseleave(function () {
$(this).stop().animate({
fontSize: "50px"
}, 600);
});
$(".text div").mouseenter(function () {
$(this).stop().animate({
fontSize: "100px"
}, 600);
});