javascript - Use jquery to control the width of the image to enlarge it. When the width of the img is equal to the width of the outer div, the width of the img cannot be enlarged. How to break this limit?
学习ing
2017-07-05 10:48:01
$scope.bigimgFun = function () {
var width = $("#showImg").width(); var height = $("#showImg").height(); console.log(width); console.log(height); $("#showImg").css({ "width":(width+100).toString()+'px'} ); };
It’s probably covered by the outer layer of p
Just don’t fix the size of the outer p. . Or you can use a script to modify the width and height of the outer p.
The problem is that part of the content cannot be seen or the width of the content cannot be enlarged;
The outer p does not have a given width, it depends on the content, or the img is separated from the document flow.