小编jon*_*220的帖子

CSS 调整图像背景而不是内容的亮度

该部分有一个背景图像,顶部有内容。我只想降低该部分中背景图像的亮度,而不是降低内容的亮度。

我已经尝试了下面的方法,但是,亮度仍然适用于所有人,而不仅仅是图像。

<!-- Section -->
<div id="section1">
    <div id="content">



    <h1 class="heading">headline text</h1>
    <h4 class="subHeading"> Sub-headline text</h4>

    <!-- Call to action button -->
    <br><br>
    <button> Join our wait list </button>

</div>
Run Code Online (Sandbox Code Playgroud)

#section1 {
background: url('../images/headerimage1.jpg') center center no-repeat;
background-size: cover;
-webkit-filter: brightness(0.5);
filter: brightness(0.5);
    padding-top: 100px;
    padding-bottom: 100px;
    padding-left: 10%;
    padding-right: 10%;
    color: white;
    text-align: center;
}

#content {
  -webkit-filter: brightness(1);
filter: brightness(1);
}
Run Code Online (Sandbox Code Playgroud)

html css filter

3
推荐指数
1
解决办法
1万
查看次数

创建Stripe令牌时出现问题:402(需要付款)错误

今天是个好日子,

下面是在控制台中引发的错误代码:

   (index):3 POST https://api.stripe.com/v1/tokens 402 (Payment Required)

(index):3 POST https://api.stripe.com/v1/tokens 402 (Payment Required)c @ (index):3e @ (index):3a @ (index):3Stripe.isDoubleLoaded.Stripe.xhr @ (index):3Stripe.a._rawRequest @ (index):2Stripe.a.request @ (index):2Stripe.token.a.create @ (index):2Stripe.card.b.createToken @ (index):2Stripe.a._channelListener @ (index):2incoming @ (index):2f @ (index):2
Run Code Online (Sandbox Code Playgroud)

以下是JavaScript代码

// Generate the user token
$(function() {


      // Once the user has submited the form
      $(".submit").click(function(e) {

                  // Prevent the form from submiting by default
          e.preventDefault();

          // Ensure that checkbox is checked
          if($('#checkbox').is(":checked")) {

            // Prevent the form from submiting by default
            var …
Run Code Online (Sandbox Code Playgroud)

javascript jquery payment-gateway stripe-payments

2
推荐指数
1
解决办法
2240
查看次数