原效果用addClass 改为slideUp,纯学习
效果图:
代码如下:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <link rel="stylesheet" type="text/css" href="css.css" rel="external nofollow" > <title>Document</title> </head> <body> <style type="text/css"> *{margin:0;padding:0;list-style-type:none;} a,img{border:0;} a{color:#000;text-decoration: none;font-weight: 600} body{font:12px/180% Arial, Helvetica, sans-serif, "新宋体";} .sph{ width: 1300px; margin: 0 auto; padding: 100px 0; } .spbq{ width: 250px; height: 250px; float: left; line-height: 2; padding: 10px 10px 0 20px; margin: 20px; position: relative; overflow: hidden; } .spbq h2{ color: #14191e; font: bold 14px/18px "Microsoft Yahei","Hiragino Sans GB",Helvetica,"微软雅黑",Tahoma,Arial,sans-serif; margin-top: 18px; } .spbq span{ display: block; color: #b4bbbf; font: 12px/18px "Microsoft Yahei","Hiragino Sans GB",Helvetica,"微软雅黑",Tahoma,Arial,sans-serif; margin: 8px 0; } .spbq b{ color: #787d82; font: 12px/18px "Microsoft Yahei","Hiragino Sans GB",Helvetica,"微软雅黑",Tahoma,Arial,sans-serif; } .biankuang{ width: 3px; height: 3px; position: absolute; z-index: 99; border-radius:10px; /*background: black;*/ } .biankuang_1{ height: 3px; top: -6px; left:0px; border-left: 3px solid #EB5858; } .biankuang_2 { width: 0px; bottom:-3px; left: 0px; border-top: 3px solid #EB5858; } .biankuang_3{ height: 0px; bottom:0px; right:0px; border-right: 3px solid #EB5858; } .biankuang_4{ width:0px; top:-3px; right:0px; border-bottom: 3px solid #EB5858; } .text_gobuy { position: absolute; z-index: 9; bottom: 0; left: 0px; width: 280px; height: 50px; overflow: hidden; background-color: rgba(32, 32, 33,0.5); cursor: pointer; display: none; text-align: center; } .text_gobuy_show{ padding: 20px 15px ; opacity: 1; } .spbq p{ position: absolute; bottom:10px; left:110px; line-height: 33px; color: #fff } </style> </head> <body> <div class="sph"> <div class="spbq"> <div class="biankuang biankuang_1"></div> <div class="biankuang biankuang_2"></div> <div class="biankuang biankuang_3"></div> <div class="biankuang biankuang_4"></div> <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" ><div class="zst"><img src="/UploadFiles/2021-04-02/0-135.jpg">以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,同时也希望多多支持!