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
学习ing 2017-07-05 10:48:01
0
3
887

$scope.bigimgFun = function () {

var width = $("#showImg").width(); var height = $("#showImg").height(); console.log(width); console.log(height); $("#showImg").css({ "width":(width+100).toString()+'px'} ); };
学习ing
学习ing

reply all (3)
習慣沉默

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.

        Latest Downloads
        More>
        Web Effects
        Website Source Code
        Website Materials
        Front End Template
        About us Disclaimer Sitemap
        php.cn:Public welfare online PHP training,Help PHP learners grow quickly!