• 微信小程序修改van-popup的背景颜色


    效果图:
    van-popup背景颜色渐变

    使用深度修改样式不生效,直接在 custom-style里面修改即可;

    1. position="bottom"
    2. custom-style="height:25%;background:linear-gradient(95deg, #F8FCFF -0.03%, #EDF5FF
    3. 64.44%, #F8FCFF 133.06%);" 在这里设置渐变背景
    4. round
    5. show="{{ showLogin }}"
    6. bind:close="onLoginClose">
    7. <button
    8. open-type="getPhoneNumber" open-type是微信原生自带
    9. class="wx-login-btn wx-btn"
    10. bindgetphonenumber="wxLogin">手机号快捷登录button>
    11. <checkbox-group class="certificate" style="width: 90%;margin:24rpx 40rpx;">
    12. <checkbox checked="{{isagree}}" class="checkbox" value="{{sms}}">checkbox>
    13. <view class="certificate-txt">阅读并同意<text class="txt" bindtap="openUrl" data-num='lending006'>《用户信息授权书》text>、<text class="txt" bindtap="openUrl" data-num='lending008'>《卖家云SaaS系统服务协议》text>view>
    14. checkbox-group>

    样式代码,包括同意协议勾选前后的样式,

    1. .herad .wx-login-btn {
    2. margin: 80rpx 0 64rpx 0;
    3. height: 96rpx;
    4. line-height: 96rpx;
    5. font-size: 30rpx;
    6. border-radius: 6rpx;
    7. width: 90%;
    8. color: #fff;
    9. right: 0;
    10. display: flex;
    11. justify-content: center;
    12. align-items: center;
    13. position: flex;
    14. bottom: 0;
    15. left: 0;
    16. padding: 0;
    17. margin-left: 5%;
    18. text-align: center;
    19. /* padding-left: -5rpx; */
    20. border-top-left-radius: 50rpx;
    21. border-bottom-left-radius: 50rpx;
    22. border-top-right-radius: 50rpx;
    23. border-bottom-right-radius: 50rpx;
    24. letter-spacing: 3rpx;
    25. }
    26. .wx-btn {
    27. background: var(--blue, linear-gradient(90deg, #1463FF 0%, #7214FF 100%));
    28. box-shadow: 0rpx 8rpx 20rpx 0rpx rgba(20, 72, 255, 0.20);
    29. }
    30. .wx-btn:hover{
    31. box-shadow: 10rpx 10rpx 32rpx #91c9f4;
    32. }
    33. .certificate {
    34. display: flex;
    35. align-items: flex-start;
    36. justify-content: space-between;
    37. margin-top: 24rpx;
    38. font-size: 30rpx;
    39. color: #666666;
    40. }
    41. .checkbox .wx-checkbox-input {
    42. border-radius: 10rpx;
    43. /* 圆角 */
    44. width: 40rpx;
    45. /* 背景的宽 */
    46. height: 40rpx;
    47. border: none;
    48. }
    49. .checkbox .wx-checkbox-input {
    50. background:#E7E7E7
    51. }
    52. .checkbox .wx-checkbox-input.wx-checkbox-input-checked {
    53. background:#E7E7E7
    54. }
    55. .checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
    56. width: 40rpx;
    57. height: 40rpx;
    58. line-height: 40rpx;
    59. text-align: center;
    60. font-size: 20rpx;
    61. color: #7B7B7B;
    62. background: transparent;
    63. transform: translate(-50%, -50%) scale(1);
    64. -webkit-transform: translate(-50%, -50%) scale(1);
    65. }
    66. .certificate-txt{
    67. color: #222;
    68. font-size: 24rpx;
    69. }
    70. .txt {
    71. color: #1F6DF2;
    72. font-size: 24rpx;
    73. }

  • 相关阅读:
    Linux shell命令行参数解析getopts/getopt用法详解
    Python中的缓存库
    PostgreSQL的主从复制方式
    SpringBoot整合websockt实现消息对话
    IDEA自动注解设置(中文版)
    集线器、交换机、路由器是如何转发包的
    连接虚拟机报错 Could not connect to ‘192.168.xxx.xxx‘ (port 22): Connection failed.
    HtmlCss光标(插入符caret)透明隐藏光标 221106笔记
    C++ 中的单例模式singleton
    【LeetCode热题100】--48.找到字符串中所有字母异位词
  • 原文地址:https://blog.csdn.net/qq_59626859/article/details/133880549