移动内容储物柜弹出CSS

时间:2016-08-15 07:31:17

标签: css

我需要用css弹出一个简单的完整页面。 我使用CPA网络中的内容储物柜,它允许我在内容储物柜中使用自定义Css。 桌面内容锁定器默认为弹出类型。但是移动内容储物柜是静态整页,我只是希望移动内容储物柜像桌面储物柜一样弹出。 我需要移动储物柜才能弹出整页。

桌面内容储物柜演示: Desktop Demo

移动Conent Locker演示: Mobile Demo

桌面内容储物柜CSS:

@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700,300,200);

.lockerBackground {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    opacity: 0.8;
    display: none;
    z-index: 9999998;
}

.lockerPopup {
    height: auto;
    z-index: 9999999;
    top: 50%;
    left: 50%;
    position: fixed;
}

.lockerPopup .header {
    text-align: center;
    font-weight: bold;
    font-family: 'Source Sans Pro', sans-serif;
}

.lockerPopup .content {
    text-align: center;
    font-family: 'Source Sans Pro', sans-serif;
}

.lockerPopup .footer {
    font-family: 'Source Sans Pro', sans-serif;
    text-align: center;
}

.lc-checks {
    list-style: none;
    margin: 0;
    position: relative;
    font-family: 'Source Sans Pro', sans-serif;
}

.lc-checks li {
    position: relative;
    cursor: hand;
    text-align: center;
    display: block;
}

/* Animation & Spinner */
.animated {
    -webkit-animation-duration: 1.5s;
    animation-duration: 1.5s;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both
}

@-webkit-keyframes bounceInDown {
    0% {
        opacity: 0;
        -webkit-transform: translate(-50%, -2000px)
    }
    60% {
        opacity: 1;
        -webkit-transform: translateY(-50%, -53%)
    }
    80% {
        -webkit-transform: translateY(-50%, -51%)
    }
    100% {
        -webkit-transform: translate(-50%, -50%)
    }
}

@keyframes bounceInDown {
    0% {
        opacity: 0;
        transform: translate(-50%, -2000px)
    }
    60% {
        opacity: 1;
        transform: translate(-50%, -53%)
    }
    80% {
        transform: translate(-50%, -51%)
    }
    100% {
        transform: translate(-50%, -50%)
    }
}

.bounceInDown {
    -webkit-animation-name: bounceInDown;
    animation-name: bounceInDown
}

/* Small Screens */
@media only screen and (min-device-width: 560px) and (max-width:800px) {

    .lockerPopup {  width: 400px !important;   }
    .lockerPopup .content {  font-size: 16px !important;  }
    .lockerPopup .header {  font-size: 20pt;  color: #315965;  }
    .lc-checks li {  font-size: 10pt;  padding: 15px;  margin-left: 0 !important;  }

}

/* Large Screens */

@media only screen and (min-width:800px) {

    .lockerPopup .header {  font-size: 26pt;  }
    .lockerPopup .content {  font-size: 18px;  }
    .lc-checks {  padding: 20px 0;  }
    .lc-checks li {  padding: 15px 0;  }
    .lc-checks li {  background-color: rgba(73, 128, 227, 0.59);  }

}

/* You may change these styles */

.lockerPopup {
    position: fixed;
    height: auto;
    width: 580px;
    background-color: #fff;
    padding: 15px;
    border-radius: 5px;
    z-index: 9999999;
    box-shadow: 0 0 0 10px rgba(45, 208, 255, 0.25);

    top: 50%;
    left: 50%;

}


.lockerPopup .header {
    padding: 0 0 10px;
    border-bottom: 1px solid #C3C2C2;
    color: #315965;
}

a   {  color: #475890;  }

.lockerPopup .content {
    padding: 20px 10px 0px 10px;
}

.lc-checks {
    padding: 20px 0;
}

.lc-checks li {
    margin-bottom: 10px;
    font-weight: 800;
    background-color: rgba(73, 128, 227, 0.59);

}

.lockerPopup .footer {
    padding: 10px 0 0;
    font-size: 14px;
    border-top: 1px solid #C3C2C2;
    padding: 15px 10px 5px 10px;
    font-weight: 300;
}

.button {
    background-color: #4980E3;
    color: #f7fdf8;
    border: 1px solid #006DE1;
    font-size: 1.0em;
    padding: 0.625rem 0;
    text-align: center;
    width: 100%;
    transition: all 0.2s ease;
    user-select: none;
    position: relative;
    top: 0;
    cursor: pointer;

}
.lockerBackground {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    opacity: 0.8;
    display: none;
    z-index: 9999998;
}

.button:hover {  background-color: #4980E3;  color: white;  }
.button:active {  user-select: none;  }
button:focus {  outline: 0;  }

/* Animation & Spinner */
.spinner-circle {
    width: 14px;
    height: 14px;
    margin: -4px 0;
    border: 2px solid #fff;
    display: inline-block;
    border-radius: 500px;
    -webkit-border-radius: 500px;
    -moz-border-radius: 500px;
    position: relative
}
.spinner-circle:before {
    content: '';
    width: 0;
    height: 0;
    border-top: 14px solid rgba(73, 128, 227, .5);
    border-right: 14px solid transparent;
    position: absolute;
    left: 6px;
    top: 6px;
    display: block
}
.spin {
    -webkit-animation: spin 2s infinite linear;
    animation: spin 2s infinite linear
}
@-webkit-keyframes spin {
    0% {
        -webkit-transform: rotate(0);
        transform: rotate(0)
    }
    100% {
        -webkit-transform: rotate(359deg);
        transform: rotate(359deg)
    }
}
@keyframes spin {
    0% {
        -webkit-transform: rotate(0);
        transform: rotate(0)
    }
    100% {
        -webkit-transform: rotate(359deg);
        transform: rotate(359deg)
    }
}

移动内容储物柜CSS:

.ui-dialog .ui-dialog-title {
    text-align: center;
    width: 100%;
}

.ui-dialog .ui-dialog-buttonpane button {
    margin-top: 10px;
    width: 255px;
    height: 50px;
}

.ui-widget-header {
    border: none;
    background: none;
}

.ui-dialog .ui-dialog-titlebar-close span {
    display: none;
}

.ui-widget-overlay{
    opacity: .60 !important; /* Make sure to change both of these, as IE only sees the second one */
    filter: Alpha(Opacity=60) !important;
    background-color: rgb(50, 50, 50) !important; /* This will make it darker */
}

如何使我的移动内容储物柜像桌面储物柜一样弹出。 我想要整页手机弹出。我怎么能用Css做到这一点? 能帮帮我吗,谢谢你。

1 个答案:

答案 0 :(得分:0)

我很确定它就像设置以下css一样简单:

.ui-dialog {
  position: absolute;
  height: 100% !important;
  width: 100% !important;
  overflow-y: scroll;
  top: 0 !important;
  left: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}

我正在使用!important,因为我猜jQuery UI为元素设置了内联样式。