将图像添加到Bootstrap3的默认导航栏下拉菜单中的最佳方式是什么?我想在下面的图片中重新创建布局,图片填充到下拉菜单中项目的右侧。有什么想法吗?将图像添加到引导程序下拉菜单
编辑:我打算在移动设备上隐藏图像以获得更好的可用性,所以我只想在桌面上使用这种布局。
下面是我在哪里到目前为止
.dropdown-menu {
padding-right: 150px; /* width of img */
position: relative;
}
.dropdown-menu:after {
position: absolute;
top: 0;
bottom: 0;
right: 0;
width: 150px; /* width of img */
background: url(http://placehold.it/150x220) center;
background-size: cover;
}
看到我的编辑答案!现在它的工作! – Suresh 2014-09-05 10:16:04