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日

悬赏问题

  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP