Как предотвратить появление всплывающего окна javascript на свитке?

0

У меня проблемы с этим всплывающим окном Javascript. Он отлично работает на одну важную вещь, когда я просматриваю страницу на моем главном экране, если я нажимаю кнопку входа в систему, это всплывающее окно, похоже, скрывается вверху. Он не подходит для свитка.

Я добавил скриншоты, чтобы показать, что я имею в виду. первый показывает, что он выглядит хорошо, а другой показывает, когда я немного прокручиваю и нажимаю кнопку.

Кажется, что он также скрывает строку меню вверху.., которая исправлена

Я понятия не имею, как это исправить. У кого-нибудь есть идея?

Изображение 174551Изображение 174551

<script src="/jquery.avgrund.js"></script>
<script>
$(function() {
    $('#show').avgrund({
        height: 700,
        holderClass: 'custom',
        showClose: true,
        showCloseText: 'close',
        onBlurContainer: '.containerrr',
        template: '<section id="conntent">' +
        '<form form name="login" action="loginprocess.php" method="post"  accept-charset="utf-8">' +
        '<a href="Home_Page.php"><img src="images/logopop.png"></a>' +
        '<h1></h1>' + '<div>' + '<input type="text" name="email" placeholder="[email protected]" required id="username" />' + '</div>' + '<div>' + '<input type="password" name="password" placeholder="Password" required id="password" />' + '</div>' + '<div>' + '<input type="submit" id="submit" name="submit" value="Log In">' + '</div>' + '</form>' + '</section>'

    });
});
</script>

Мой CSS

.containerrr {
position: fixed;
width: 900px;
opacity: 0.95;
filter: alpha(opacity=95);
margin-bottom: 12%;
margin-left: auto;
margin-right: auto;
margin-top: 10%;
   }

 #conntent {
background-color: rgba(250,250,250,1.0);
padding: 25px 0 0;
position: fixed;
text-align: center;
text-shadow: 0 1px 0 #fff;
width: 350px;
margin-bottom: 0;
margin-left: 3%;
margin-right: 0;
margin-top: 1px;
  }
   #conntent h1 {
color: #7E7E7E;
font: bold 25px Helvetica, Arial, sans-serif;
letter-spacing: -0.05em;
line-height: 20px;
margin: 10px 0 30px;
  }
  #conntent h1:before,
  #conntent h1:after {
content: "";
height: 1px;
position: absolute;
top: 10px;
width: 27%;
   }
   #conntent h1:after {
background: rgb(126,126,126);
background: -moz-linear-gradient(left,  rgba(126,126,126,1) 0%, rgba(255,255,255,1) 100%);
background: -webkit-linear-gradient(left,  rgba(126,126,126,1) 0%,rgba(255,255,255,1) 100%);
background: -o-linear-gradient(left,  rgba(126,126,126,1) 0%,rgba(255,255,255,1) 100%);
background: -ms-linear-gradient(left,  rgba(126,126,126,1) 0%,rgba(255,255,255,1) 100%);
background: linear-gradient(left,  rgba(126,126,126,1) 0%,rgba(255,255,255,1) 100%);
right: 0;
   }
   #conntent h1:before {
background: rgb(126,126,126);
background: -moz-linear-gradient(right,  rgba(126,126,126,1) 0%, rgba(255,255,255,1) 100%);
background: -webkit-linear-gradient(right,  rgba(126,126,126,1) 0%,rgba(255,255,255,1) 100%);
background: -o-linear-gradient(right,  rgba(126,126,126,1) 0%,rgba(255,255,255,1) 100%);
background: -ms-linear-gradient(right,  rgba(126,126,126,1) 0%,rgba(255,255,255,1) 100%);
background: linear-gradient(right,  rgba(126,126,126,1) 0%,rgba(255,255,255,1) 100%);
left: 0;
}


#conntent form { margin: 0 20px; position: relative }
#conntent form input[type="text"],
#conntent form input[type="password"] {
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: 0 1px 0 #fff, 0 -2px 5px rgba(0,0,0,0.08) inset;
-moz-box-shadow: 0 1px 0 #fff, 0 -2px 5px rgba(0,0,0,0.08) inset;
-ms-box-shadow: 0 1px 0 #fff, 0 -2px 5px rgba(0,0,0,0.08) inset;
-o-box-shadow: 0 1px 0 #fff, 0 -2px 5px rgba(0,0,0,0.08) inset;
box-shadow: 0 1px 0 #fff, 0 -2px 5px rgba(0,0,0,0.08) inset;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-ms-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;
background: #eae7e7 url(http://cssdeck.com/uploads/media/items/8/8bcLQqF.png) no-repeat;
border: 1px solid #c8c8c8;
color: #777;
font-family:'Source Sans Pro', sans-serif;
font-size:15px;
margin: 0 0 10px;
padding: 15px 10px 15px 40px;
width: 80%;
 }
#conntent form input[type="text"]:focus,
#conntent form input[type="password"]:focus {
-webkit-box-shadow: 0 0 2px #00bbe0 inset;
-moz-box-shadow: 0 0 2px #00bbe0 inset;
-ms-box-shadow: 0 0 2px #00bbe0 inset;
-o-box-shadow: 0 0 2px #00bbe0 inset;
box-shadow: 0 0 2px #00bbe0 inset;
background-color: #fff;
border: 1px solid #00bbe0;
outline: none;
}
#username { background-position: 10px 10px !important }
#password { background-position: 10px -53px !important }
#conntent form input[type="submit"] {
border: 1px solid #00a2e2;
background: -webkit-linear-gradient(top,  #00a2e2 0%,#00a2e2 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top,  #00a2e2 0%,#00a2e2 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top,  #00a2e2 0%,#00a2e2 100%); /* IE10+ */
background: linear-gradient(to bottom,  #00a2e2 0%,#00a2e2 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#64c8ef', endColorstr='#00a2e2',GradientType=0 ); /* IE6-9 */
color: #fff;
float: right;
font-family: 'Source Sans Pro', sans-serif;
font-size: 16px;
height: 35px;
position: fixed;
width: 120px;
margin-bottom: 35px;
margin-left: 15px;
margin-top: 25px;
margin-right: 0px;
  }
  #conntent form input[type="submit"]:hover {
cursor:pointer;
border-color:rgba(71, 186, 255, 1);
background: rgba(71, 186, 255, 1);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fec151', endColorstr='#fee79a',GradientType=0 );
 }
 #conntent form div a {
color: #004a80;
float: right;
font-size: 12px;
text-decoration: underline;
margin-bottom: 0;
margin-left: 0;
margin-right: 15px;
margin-top: 25px;
 }
  • 0
    Вы даже хотите, чтобы люди прокручивали страницу вниз, когда у вас открыто всплывающее окно, если нет, вы можете полностью отключить прокрутку страницы, когда всплывающее окно открыто stackoverflow.com/questions/6411282/…
  • 0
    Какой CSS связан с контейнером, в котором находится ваше всплывающее окно? Вероятно, это либо класс с именем custom либо, может быть, вы добавили его в content id?
Показать ещё 2 комментария
Теги:
popup
avgrund

1 ответ

0

Использовать position: fixed как в заголовке страницы, так и в контейнере всплывающего окна. Затем вы сможете прокручивать все остальное, и эти элементы останутся неизменными относительно окна браузера.

  • 0
    сделал это, но ничего не сделал. Проблема осталась.
  • 0
    Можете ли вы опубликовать измененные правила CSS, которые применяются к этим элементам? Он должен работать. Любой элемент с position: fixed будет игнорировать прокрутку.
Показать ещё 1 комментарий

Ещё вопросы

Сообщество Overcoder
Наверх
Меню