小编iMA*_*MAD的帖子

HTML和CSS:点击"我接受"后隐藏cookie栏

我正在一个网站上工作,我想知道如何在点击"我接受"或其他任何内容后隐藏cookie通知.我不想使用webkits,我想要纯HTML(如果需要的话还需要CSS),甚至是PHP.

#cookie-bar.fixed {
            position: fixed;
            bottom: 5;
            left: 0;
            z-index: 100;
            
        }

        #cookie-bar {
            line-height: 24px;
            color: #eeeeee;
            text-align: center;
            padding: 3px 0;
            width: 100%;
            color: white;
            background-color: #444;
            
            
        }

        .cb-enable {
            border-radius: 10%;
            margin-left: 100px;
            color: white;
            padding: 5px;   
            border-radius: 10%;
            font-family: serif;
            text-decoration: none;
            transition: .3s background-color;
            
            
            
         }
        
        .cb-enable:hover {
            background-color: darkcyan;
        }
        
        .cb-policy {
            color: white;
            text-decoration: underline;
        }
        
        .cb-policy:hover {
            color: darkcyan;
        }
Run Code Online (Sandbox Code Playgroud)
   <div id="cookie-bar" class="fixed">
     <p>We use cookies to enhance your experience in our web …
Run Code Online (Sandbox Code Playgroud)

html css cookies

5
推荐指数
1
解决办法
6720
查看次数

标签 统计

cookies ×1

css ×1

html ×1