0

登録ページがあります。登録を完了して[保存]ボタンをクリックすると、「登録が成功しました」という通知が表示されます。通知にはbigbox.cssとhumane.jsを使用しています。通知は簡単に届きますが、問題は通知にデフォルトの高さと幅があることです。高さとワイトをカスタマイズするにはどうすればよいですか?

   var ratPack = $.sammy(function() {
        this.post('#/cart', function() {
           var firstname = this.params['firstName'];
    var lastname = this.params['lastName'];
    var organisation = this.params['organisation'];
    var email = this.params['email'];
    var password = this.params['password'];
    var confirmPassword = this.params['confirmPassword'];
    var baseurl = this.params['url'];
           $.ajax({
        type : 'POST',
        url :'/costing-
     tool/api/registration/'+firstname+'/'+lastname+'/'+email,
        success : function() {
         document.getElementById('light').style.display='none';
             document.getElementById('fade').style.display='none';
             humane.log("Registration Successful");//humane used here
                    },
        error:function(){
            alert($('#emailError'));
            $('#emailError').text("This E-Mail is already registered")
        }
   });
});
  });

bigbox.css

 html,
  body {
   min-height: 100%;
  }
.humane,
.humane-bigbox {
 position: fixed;
 -moz-transition: all 0.3s ease-out;
 -webkit-transition: all 0.3s ease-out;
-ms-transition: all 0.3s ease-out;
-o-transition: all 0.3s ease-out;
 transition: all 0.3s ease-out;
 z-index: 100000;
 filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
  }
 .humane,
 .humane-bigbox {
  font-family: Ubuntu, Verdana, sans-serif;
  line-height: 40px;
  font-size: 20px;
  top: 25%;
   left: 25%;
   opacity: 0;
   width: 50%;
   min-height: 40px;
  padding: 30px;
  text-align: center;
   background-image: 
    url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADICAYAAAAp8ov1
   AAAABmJLR0QA/wD/AP+gvaeTAAAAc0lEQVQokb2RQQ6EMAwDx/7/n80BtIEC3RYh
   LlXrVLGTAYiBWBIGtkPSP01SfreTVoV5re9Rcee1scwDk9NurbR6
  2sZJcpzy9O+2X5KsXabyPaQFYNuvkqkRviDTp9Vs8opC0TpkHvJtVjeReW/
  5kEyX1gKeLEKE9peeWAAAAABJRU5ErkJggg==');
  background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #000),
   color-stop(1, rgba(0,0,0,0.9))) no-repeat;
 background: -moz-linear-gradient(top, #000 0%, rgba(0,0,0,0.9) 100%) no-repeat;
 background: -webkit-linear-gradient(top, #000 0%, rgba(0,0,0,0.9) 100%) no-repeat;
 background: -ms-linear-gradient(top, #000 0%, rgba(0,0,0,0.9) 100%) no-repeat;
 background: -o-linear-gradient(top, #000 0%, rgba(0,0,0,0.9) 100%) no-repeat;
 background: linear-gradient(top, #000 0%, rgba(0,0,0,0.9) 100%) no-repeat;
*background-color: #000;
 color: #fff;
-moz-border-radius: 15px;
-webkit-border-radius: 15px;
 border-radius: 15px;
 text-shadow: 0 -1px 1px #ddd;
 -moz-box-shadow: 0 15px 15px -15px #000;
 -webkit-box-shadow: 0 15px 15px -15px #000;
  box-shadow: 0 15px 15px -15px #000;
 -moz-transform: scale(0.1);
 -webkit-transform: scale(0.1);
 -ms-transform: scale(0.1);
 -o-transform: scale(0.1);
 transform: scale(0.1);
 }
  .humane p,
  .humane-bigbox p,
  .humane ul,
  .humane-bigbox ul {
   margin: 0;
   padding: 0;
   }
   .humane ul,
   .humane-bigbox ul {
   list-style: none;
    }
     .humane.humane-bigbox-info,
     .humane-bigbox.humane-bigbox-info {
      background-image:  url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA
         EAAADICAYAAAAp8ov1AAAABmJLR0QA/wD/AP+gvaeTAAAAQElEQVQokW
         NgYEj5z8TAwPCfiYGBgQGVIEKMTG2DTYwRVez/IHIaNcUGyBnYg
         pORel6gpvFEJhBqpxIaG8/AAADsKDq/HhYQ2AAAAABJRU5ErkJggg==');
        background: -webkit-gradient(linear, left top,
      left bottom, color-stop(0, #000064),   color-stop(1, rgba(0,0,100,0.9))) no-
     repeat;
     background: -moz-linear-gradient(top, #000064 0%, rgba(0,0,100,0.9) 100%) no-
      repeat;
     background: -webkit-linear-gradient(top, #000064 0%, rgba(0,0,100,0.9) 100%) no- 
      repeat;
      background: -ms-linear-gradient(top, #000064 0%, rgba(0,0,100,0.9) 100%) no-
     repeat;
     background: -o-linear-gradient(top, #000064 0%, rgba(0,0,100,0.9) 100%) no-repeat;
     background: linear-gradient(top, #000064 0%, rgba(0,0,100,0.9) 100%) no-repeat;
     *background-color: #030;
       }
      .humane.humane-bigbox-success,
       humane-bigbox.humane-bigbox-success {
      background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUg
       AAAAEAAADICAYAAAAp8ov1AAAABmJLR0QA/wD/AP+gvaeTAAAAP
      klEQVQokWNgSGH4z8TAACEYUAkixMjUNsjEGFHF/g8ip1FVbGC
      cgS04GannBaoaT1wCwWkvmXbQ2HgGBgYA8Yw6v+m4Kh8AAAAASUVORK5CYII=');
       background: -webkit-gradient(linear, left top, 
     left bottom, color-stop(0,       #006400), color-stop(1, rgba(0,100,0,0.9))) no-
     repeat;
     background: -moz-linear-gradient(top, #006400 0%, rgba(0,100,0,0.9) 100%) no-
     repeat;
    background: -webkit-linear-gradient(top, #006400 0%, rgba(0,100,0,0.9) 100%) no-
    repeat;
     background: -ms-linear-gradient(top, #006400 0%, rgba(0,100,0,0.9) 100%) no-repeat;
     background: -o-linear-gradient(top, #006400 0%, rgba(0,100,0,0.9) 100%) no-repeat;
     background: linear-gradient(top, #006400 0%, rgba(0,100,0,0.9) 100%) no-repeat;
    *background-color: #030;
    }
    .humane.humane-bigbox-error,
    .humane-bigbox.humane-bigbox-error {
     background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA
       AEAAADICAYAAAAp8ov1AAAABmJLR0QA/wD/AP+gvaeTAA
       AAPklEQVQokWNIYWD4z8QAJRhQCSLEyNQ2uMQYUcX+DyKnUVd
     sQJyBLTgZqecF6hpPVALBaS+ZdtDYeAYGBgYA9vA6v4OR3MkAAAAASUVORK5CYII=');
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #640000),
     color-stop(1, rgba(100,0,0,0.9))) no-repeat;
     background: -moz-linear-gradient(top, #640000 0%, rgba(100,0,0,0.9) 100%) no-
     repeat;
      background: -webkit-linear-gradient(top, #640000 0%, rgba(100,0,0,0.9) 100%) no-
      repeat;
      background: -ms-linear-gradient(top, #640000 0%, rgba(100,0,0,0.9) 100%) 
     no-repeat;
      background: -o-linear-gradient(top, #640000 0%, rgba(100,0,0,0.9) 100%) no-repeat;
     background: linear-gradient(top, #640000 0%, rgba(100,0,0,0.9) 100%) no-repeat;
    *background-color: #300;
   }
   .humane.humane-animate,
   .humane-bigbox.humane-bigbox-animate {
    opacity: 1;
    -moz-transform: scale(1);
    -webkit-transform: scale(1);
    -ms-transform: scale(1);
    -o-transform: scale(1);
    transform: scale(1);
    }
    .humane.humane-animate:hover,
    .humane-bigbox.humane-bigbox-animate:hover {
     opacity: 0.6;
     -moz-transform: scale(0.8);
     -webkit-transform: scale(0.8);
    -ms-transform: scale(0.8);
    -o-transform: scale(0.8);
     transform: scale(0.8);
     }
     .humane.humane-js-animate,
      .humane-bigbox.humane-bigbox-js-animate {
      opacity: 1;
     -moz-transform: scale(1);
     -webkit-transform: scale(1);
      -ms-transform: scale(1);
       -o-transform: scale(1);
      transform: scale(1);
       }
      .humane.humane-js-animate:hover,
       .humane-bigbox.humane-bigbox-js-animate:hover {
       opacity: 0.6;
       filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=60);
     }
4

2 に答える 2

2

あなたはCSSに非常に慣れていないようですが、親要素の幅の50%であるbigboxの幅を変更できます。ビッグボックスの高さについては、デフォルトで自動に設定されており(そのため、現在表示されていません)、ビッグボックス内にリストやテキストがない場合は、最小の高さが40ピクセルに設定されています。

.humane-bigbox {
   font-family: Ubuntu, Verdana, sans-serif;
   line-height: 40px;
   font-size: 20px;
   top: 25%;
   left: 25%;
   opacity: 0;
   width: 50%; <- This is the width value
   min-height: 40px;
   ...
}

参考文献:

于 2012-12-07T11:39:06.330 に答える
0

あなたのラインコードで見てください:

humane.log("Registration Successful");//humane used here

これで変更:

humane.log("Registration Successful").css('width',
   'WRITE WIDTH').css('height','WRITE Height');//humane used here

それがうまくいくことを願っています....頑張ってください

于 2012-12-07T10:01:49.993 に答える