代码实现: ```python def floating_search_bar(request): return render(request, 'floating_search_
解析:这个需求是要求生成一个使用CSS和JavaScript实现的简单底部浮动搜索框效果代码。 代码如下: HTML部分: ```html
一段CSS+JS简单的底部浮动搜索框效果代码,实现PC移动端底部浮悬代码。
CSS代码
<styletype="text/css">*{margin:0px;padiing:0px;}.login_alert{position:fixed;bottom:0px;left:0px;width:100%;z-index:9999;}.login_alert_close{position:absolute;top:-10px;right:0px;z-index:1;cursor:pointer;}.login_alert_box{width:100%;text-align:center;background-color:rgba(61,61,61,0.6);height:60px;}.login_alert_boxdiv{cursor:default;font-family:'微软雅黑';color:#66CCFF;font-size:26px;font-weight:bold;line-height:80px;}.login_alert_boxdiva{text-decoration:none;display:inline-block;padding:5px20px;font-size:20px;color:#000;background-color:#00CC99;border-radius:4px;line-height:26px;}.login_alert_boxdivspan{font-size:18px;}.login_alert{animation:show_alert_left1.6s;-webkit-animation:show_alert_left1.6s;-moz-animation:show_alert_left1.6s;}.login_alert_box{background-color:rgba(0,0,0,0.6);height:60px;}.login_alert_box:hover{background-color:rgba(0,0,0,0.8);}.login_alert_boxdiv{color:#66CCFF;font-size:26px;line-height:60px;}.login_alert_boxdiva{font-size:20px;line-height:200px;border-radius:4px;}@keyframesshow_alert_left{from{left:-100%;}to{left:0px;}}@-webkit-keyframesshow_alert_left{from{left:-100%;}to{left:0px;}}@-moz-keyframesshow_alert_left{from{left:-100%;}to{left:0px;}}</style>
HTML代码
<divclass="login_alert"id="login_alert"><divclass="login_alert_close"onclick="closeAlert()"></div><center><scripttype="text/javascript"charset="UTF-8"src="https://apimall.dataoke.com/api/component/code-info/v1?comId=3149&type=2&v=1604687945"exte-id="3149"data-size="800x80"data-color="#FF681D"data-show="1"data-txt="网购前搜索全网隐藏优惠券更省钱!"></script></center><scripttype="text/javascript"charset="UTF-8"src="https://apimall.dataoke.com/api/component/code-info/v1?comId=3154&type=2&v=1604684235"exte-id="3154"data-size="100%*100px"data-index="5000"data-color="#FF7119"data-show="1"></script>相关专题