Home  >  Q&A  >  body text

java - 手机页面有白边

h5页面,图片有白边。dislay block无效果

天蓬老师天蓬老师2715 days ago858

reply all(4)I'll reply

  • PHP中文网

    PHP中文网2017-04-18 09:53:33

    1. Check to see if the white edges were cut off when you cut the picture;

    2. Check whether the image has no limited width and exceeds the container;

    3. Is it the margins (inside and outside) set by the image or the margins set by the container?

    4. Add a line below the picture to clear the floating layer and tryclear: both,同理给图片的父级容器写个最小高度试试min-height=10px;

    The question you asked is too abstract. It’s best to take a screenshot and attach the code next time. It’s too tiring to answer this question.

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-18 09:53:33

    Have you set the width? Or is the white border that appears a scroll bar?

    reply
    0
  • 怪我咯

    怪我咯2017-04-18 09:53:33

    Padding set?

    reply
    0
  • PHPz

    PHPz2017-04-18 09:53:33

    Are you saying there will be empty extra space at the bottom of the picture? Generally speaking display:block可以解决,不过你也可以试一下vertical-align:bottom. By the way, your way of asking the question is really bad and confusing.

    reply
    0
  • Cancelreply