作者:娜是相当滴好4 | 来源:互联网 | 2022-12-02 10:01
我已经使用了我的bootstrap-3网站作为粘性条,我尝试这样做如何 - 粘性社交栏我做了一些修改,
我用过float: right;
但它不起作用,
我的冲突是,that bar cant set to the web site float:right
我想采取正确的一面
任何人都知道如何做到这一点.
谢谢.
position: fixed;
top: 50%; float: right;
}
.icon-bar a {
display: block;
text-align: center;
padding: 16px;
transition: all 0.3s ease;
color: white;
font-size: 20px;
}
.icon-bar a:hover {
background-color: #000;
}
.facebook {
background: #3B5998;
color: white;
}
1> Viira..:
right:0;
在给出其位置时使用 - fixed
或absolute
.
此外 - 一个codepen示例https://codepen.io/anon/pen/aRqvqG (您在问题中提到的示例)
.icon-bar a {
display: block;
text-align: center;
padding: 16px;
transition: all 0.3s ease;
color: white;
font-size: 20px;
}
.icon-bar a:hover {
background-color: #000;
}
.facebook {
background: #3B5998;
color: white;
}