Simplemodal Container适用于所有浏览器的大小调整

时间:2016-01-04 03:45:01

标签: html css simplemodal

我有一个容器,一旦用户选择某个容器,就会弹出并在页面上显示图像。这在chrome中显得很好(取决于分辨率),但是我在Opera和FF中被告知它可以在角落甚至图片的顶部切断X(关闭符号)。

我想知道是否有办法根据打开的图像大小设置叠加显示,无论分辨率如何都显示居中,但无法弄清楚如何操作。

<style>
#basic-modal-content {display:none;}

/* Overlay */
#simplemodal-overlay {background-color:#000;}

/* Container */
#simplemodal-container {height:800px; width:800px; color:#bbb; background-color:black; padding:2px;}
#simplemodal-container .simplemodal-data {padding:8px;}
#simplemodal-container code {background:#141414; border-left:3px solid #65B43D; color:#bbb; display:block; font-size:12px; margin-bottom:12px; padding:4px 6px 6px;}

#simplemodal-container a {color:#ddd;}
#simplemodal-container a.modalCloseImg {background:url(../../img/basic/x.png) no-repeat; width:25px; height:29px; 

display:inline; z-index:3200; position:absolute; top:-15px; right:-16px; cursor:pointer;}
#simplemodal-container h3 {color:#84b8d9;}

1 个答案:

答案 0 :(得分:1)

您是否可以使用百分比(%)来提高响应速度,而不是以像素为单位使用[jbadmin@xxxxxx.ssh2]$ cat id_rsa_2048_a ---- BEGIN SSH2 ENCRYPTED PRIVATE KEY ---- Subject: jbadmin Comment: "2048-bit rsa, jbadmin@x01bicallapp1a, Tue Dec 29 2015 11:38:\ ---------------------------- ---------------------------- ---- END SSH2 ENCRYPTED PRIVATE KEY ---- width值?

还有heightautoResize属性可能有助于不同的浏览器和分辨率。

http://www.ericmmartin.com/projects/simplemodal/