Colorbox doesn't open at proper height when first opened

后端 未结 4 677
臣服心动
臣服心动 2021-02-13 18:12

So I\'m using the colorbox plugin for a contact form. I am just the default colorbox properties, so it should automatically adjust to the div it contains (right?).

Well

4条回答
  •  感情败类
    2021-02-13 18:53

    I've investigated the problem.

    Try to see which content you load by ajax. If it has some images without "height" and "width" attributes, the scroll bars can appear.

    It happens because the browser does not know about the image's size and doesn't wait until it loads to calculate the page layout. After the first load the image is in the cache and the browser can calculate the size.

    Try to specify the size for you images. For me it works.

提交回复
热议问题