CSS 黑白相间按钮切换效果-LMLPHP

    <template>
    	<view class="const">
    	<button class="btn-17">
    	  <span class="text-container">
    	    <span class="text">Button</span>
    	  </span>
    	</button>	
    	</view>
    </template>

    <script>

    </script>

    <style>
    	
    	body {
    		background-color: #212121;  /* 设置背景颜色 */
    	}
    	.const{
    		width: 270px;
    		margin-top: 280px;
    		margin-left: 30%;
    	}
    	.btn-17,
    	.btn-17 *,
    	.btn-17 :after,
    	.btn-17 :before,
    	.btn-17:after,
    	.btn-17:before {
    	  border: 0 solid;
    	  box-sizing: border-box;
    	}
    	
    	.btn-17 {
    	  -webkit-tap-highlight-color: transparent;
    	  -webkit-appearance: button;
    	  background-color: #000;
 
02-04 13:01