navbar

Bootstrap 4 navbar active class

我只是一个虾纸丫 提交于 2020-07-05 09:12:03
问题 I have started learning web programming as a project and I've been having a hard time with getting my links to show as active on the navbar. I did start by looking for similar questions asked in the past but none of the answers seemed to fix my problem. Here is my code <div> <hr> <nav class="container-fluid navbar navbar-expand-sm bg-dark navbar-dark" style="padding-left: 75px; margin-top: -16px;"> <ul class="navbar-nav"> <li class="active nav-item"> <a class="nav-link active" style =

Bootstrap 4 navbar active class

空扰寡人 提交于 2020-07-05 09:09:07
问题 I have started learning web programming as a project and I've been having a hard time with getting my links to show as active on the navbar. I did start by looking for similar questions asked in the past but none of the answers seemed to fix my problem. Here is my code <div> <hr> <nav class="container-fluid navbar navbar-expand-sm bg-dark navbar-dark" style="padding-left: 75px; margin-top: -16px;"> <ul class="navbar-nav"> <li class="active nav-item"> <a class="nav-link active" style =

CSS - Position:Fixed navigation bar not working in Safari (OS X or iOS)

孤街浪徒 提交于 2020-06-02 11:09:59
问题 Here is the site in question. If you view the page in Chrome, everything works as expected (scroll past the landing and the nav bar comes into view). However, it stays above everything in Safari, in both OS X and iOS. You can pull the page down and see the nav bar up there. I rarely view the site on mobile or Safari, but I do know that this worked in the past and that no changes to the CSS have been made on our end. That said, I'm wondering if it was a Safari change that caused this. One last

CSS - Position:Fixed navigation bar not working in Safari (OS X or iOS)

淺唱寂寞╮ 提交于 2020-06-02 11:09:12
问题 Here is the site in question. If you view the page in Chrome, everything works as expected (scroll past the landing and the nav bar comes into view). However, it stays above everything in Safari, in both OS X and iOS. You can pull the page down and see the nav bar up there. I rarely view the site on mobile or Safari, but I do know that this worked in the past and that no changes to the CSS have been made on our end. That said, I'm wondering if it was a Safari change that caused this. One last

Create responsive Bootstrap navbar with two rows

ⅰ亾dé卋堺 提交于 2020-05-22 21:04:57
问题 I am trying to create a responsive Bootstrap 3 based navbar with two rows. However, I am having trouble with the structure of the HTML and the collapse functionality. Below is a visual description of the desired result, and I was hoping someone could point me in the right direction in terms of HTML/CSS (with as much default Bootstrap functionality as possible). Essentially the menu is desired to do the following: On tablet/desktop devices, the first row is the logo and a menu of small

bootstrap 4 dropdown menu navbar user preferences “Welcome, User”

你。 提交于 2020-05-15 08:49:07
问题 I'm newbie to css and bootstrap and can not figure out how to solve this. Any help are welcome. I have two problems with my code. 1) When I click on the 'Welcome, User' menu in small screens (mobile), the dropdown menu opens inside the navigation bar, distorting the bar and changing its height. I want it to behave in the same way as on larger screens (desktops, for example). When I click, I want it to open the menu items without changing the navigation bar, in front of the navigation bar but

微信小程序——自定义导航栏

做~自己de王妃 提交于 2020-05-09 16:05:18
微信头部导航栏可能通过json配置: 但是有时候我们项目需求可能需要自定义头部导航栏,如下图所示: 现在具体说一下 实现步骤及使用方法 : 步骤: 1.在 app.json 里面把 "navigationStyle" 设置为 "custom" 这样子之后就只会保留右上角胶囊按钮了。 2.计算相关值 因为在不同的手机型号头部那条栏目高度可能不一致,所以为了我们适配更多型号,我们需要计算3个值: 如下图: 1. 整个导航栏的高度; 2. 胶囊按钮与顶部的距离; 3. 胶囊按钮与右侧的距离。 小程序可以通过 wx.getMenuButtonBoundingClientRect() 获取胶囊按钮的信息 和 wx.getSystemInfo() 获取设备信息。 如下图: 通过这些信息我们可以计算出上面说的3个值: 1. 整个导航栏高度 = statausBarHeight + height + (top-statausBarHeight )*2; 2. 胶囊按钮与顶部的距离 = top; 3.胶囊按钮与右侧的距离 = windowWidth - right。 关于第1步中,为啥要乘以2的原因,请看灵魂画手般的我画的图纸: App.js 代码如下: App({ globalData: { }, onLaunch: function () { let menuButtonObject = wx

如何在npm上发布vue插件

橙三吉。 提交于 2020-05-09 08:14:31
1、初始化项目    vue init webpack-simple XXXXX(此处为插件名)   使用vue创建一个简单的项目,删除src中除了main.js和app.vue外的文件,清空app.vue中无用内容 2、更改配置文件 (1)在index.js内 import headerNavbar from ' ./webappHeader ' const headNavbar = { install(Vue, options) { Vue.component(headerNavbar.name, headerNavbar) } } if ( typeof window !== ' undefined ' && window.Vue) { window.headNavbar = headNavbar Vue.use(headNavbar) } export default headNavbar (2)在package.json内   version后添加版本号,可自定,以后每次上传npm都需要更改   private值设为false(必须),不设为false无法发布   在repository内的url字段,填上该项目的github地址,可以把项目传到自己的GitHub上 (3)在webpack.config.js内   修改entry和filename (4)在index

运维开发笔记整理-基于类的视图(CBV)

流过昼夜 提交于 2020-05-08 03:07:36
             运维开发笔记整理-基于类的视图(CBV)                                        作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任。 一.FBV与CBV 1>.什么是FBV   FBC(function base views)就是在视图里使用函数处理请求。在之前django的学习中,我们一直使用的是这种方式,所以不在赘述。 2>.什么是CBV   CBV(class base views)就是在视图里使用类处理请求。   Python是一个面向对象的编程语言,如果只用函数来开发,有很多面向对象的有限就错失了(比如封装,继承和多态)。所以Django在后来加入来Class-Based-View。可以让我们用类写Vie。这样做的有点主要有下面两种:     第一:提高类代码的复用性,可以使用面向对象的技术,比如多继承。     第二:可以用不同的函数针对不同的HTTP方法处理,而不是通过很多if判断,提高代码的可读性。 二. 使用class-based views 1>.编写login.html登录页面 < html lang ="en" style ="visibility: visible; display: block;" > < head > < meta charset ="utf-8" > <

小程序新增页面导航栏

北城以北 提交于 2020-05-05 19:54:59
display:flex 是一种布局方式。它即可以应用于容器中,也可以应用于行内元素。是W3C提出的一种新的方案,可以简便、完整、响应式地实现各种页面布局。目前,它已经得到了所有浏览器的支持。 flex-direction:column; 让元素沿垂直主轴从上到下垂直排列 .navbar{background:white}:导航栏背景颜色为白色 .navbar .item:对导航栏中字体的设置,以及导航栏内元素空间如何分配 flex: auto:导航栏内元素空间弹性分配 flex:1 :导航栏内元素空间等分 { position: relative;相对定位 position: absolute;绝对定位 例如先 relative 后absolute,则absolute的部分根据relative进行定位 } .navbar .item.active:导航栏里的字体颜色 .navbar .item.active:after:选中导航栏中的某一栏是,这一栏下边界所显得颜色 来源: oschina 链接: https://my.oschina.net/u/4412439/blog/4267513