m0_70917068 2023-04-21 08:39 采纳率: 100%
浏览 35
已结题

html按钮怎样设置样式

给按钮添加了个css按钮就不能按了,怎么解决这个问题
这个是html里面的代码


<div class="ssk">
        <input class="wss" type="text" placeholder="内容" autocomplete="on">
        <button type="button" class="wss1">搜索</button>
</div>

这个是css里面的

.ssk{
    margin: 0px;
    padding: 0px;
    width: 260px;
    height: 55px;
    display: flex;
    z-index: 12;
    
}
.wss{
    width: 0px;
    height: 53px;
    color: rgba(38,38,38,0.00);
    background: rgba(250,250,250,1.00);
    text-align: center;
    outline: none;
    border: 0px rgba(230,230,230,0.00) solid;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    border-top-right-radius: 0px;
    border-bottom-right-radius: 0px;
    transition: 0.5s;
}
.wss1{
    width: 55px;
    height: 55px;
    text-align: center;
    background: rgba(240,240,240,1.00);
    border: 2px rgba(230,230,230,1.00) solid;
    border-radius: 20px;
    
}
.wss,.wss1,.ssk{
    font-size: 12px;
    font-family: 宋体;
    color: #262626; 
}
.ssk:hover .wss{
    width: 200px;
    height: 53px;
    color: rgba(38,38,38,1.00);
    background: rgba(240,240,240,1.00);
    border: 0px rgba(230,230,230,0.80) solid;
}
.ssk:hover .wss1{
    width: 55px;
    height: 55px;
    border: 0px rgba(230,230,230,0.80) solid;
    border-top-left-radius: 0px;
    border-bottom-left-radius: 0px;
}

  • 写回答

3条回答 默认 最新

  • 白云苍狗い 2023-04-21 08:57
    关注

    你好 并不是不能点击 是你没写点击的样式 所有他没发生变化
    css添加以下代码

    
    ```css
        /* 点击按钮 */
        .wss1:active {
          width: 55px;
          height: 55px;
          background: rgba(208, 75, 75, 0.8);
          border: 0px rgba(208, 75, 75, 0.8) solid;
          border-top-left-radius: 0px;
          border-bottom-left-radius: 0px;
        }
    
    

    ```

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

问题事件

  • 系统已结题 4月29日
  • 已采纳回答 4月21日
  • 创建了问题 4月21日

悬赏问题

  • ¥15 在获取boss直聘的聊天的时候只能获取到前40条聊天数据
  • ¥20 关于URL获取的参数,无法执行二选一查询
  • ¥15 液位控制,当液位超过高限时常开触点59闭合,直到液位低于低限时,断开
  • ¥15 marlin编译错误,如何解决?
  • ¥15 有偿四位数,节约算法和扫描算法
  • ¥15 VUE项目怎么运行,系统打不开
  • ¥50 pointpillars等目标检测算法怎么融合注意力机制
  • ¥20 Vs code Mac系统 PHP Debug调试环境配置
  • ¥60 大一项目课,微信小程序
  • ¥15 求视频摘要youtube和ovp数据集