需要在右侧放置引导菜单图标

时间:2017-07-31 07:12:25

标签: jquery html css twitter-bootstrap

我正在关注我网站上的以下引导菜单项。我需要将菜单图标放在页面的右上角。如何更改代码?

#menu {
  position: relative;
  color: #999;
  width: 200px;
  padding: 10px;
  margin: auto;
  font-family: "Segoe UI", Candara, "Bitstream Vera Sans", "DejaVu Sans", "Bitstream Vera Sans", "Trebuchet MS", Verdana, "Verdana Ref", sans-serif;
  text-align: center;
  border-radius: 4px;
  background: white;
  box-shadow: 0 1px 8px rgba(0,0,0,0.05);
  /* just for this demo */
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s;
}
#menu:after {
  position: absolute;
  top: -15px;
  left: 95px;
  content: "";
  display: block;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-bottom: 20px solid white;
}

Codepen

2 个答案:

答案 0 :(得分:1)

像这样改变#toggle css,

#toggle {
  margin: 30px 10px 0px auto; // changed line
}

希望有所帮助,

答案 1 :(得分:0)

我假设您正在谈论网站右上方的汉堡包图标。您可以将float:right添加到.navbar-toggle类来实现此目的。