我需要修改Bootstrap中提供的下拉菜单,使用navbar-fixed-top,不是垂直而是水平显示li { display: inline-block }(这很容易),但是我需要实际ul.dropdown-menu来拉伸页面的整个宽度.我似乎无法弄明白.
请不要给我一个megamenu插件或任何东西,请问如何修复它以拉伸整个页面的宽度?(也不是页面容器,窗口)
实际上,可能还需要包装另一个元素,因为ul需要居中.
那么有谁知道如何做到这一点?
编辑:想出来(发布后5分钟),没有添加元素:
.nav { margin-bottom: 0; }
.dropdown { position: static; }
.dropdown-menu { width: 100%; text-align: center; }
.dropdown-menu>li { display: inline-block; }
Run Code Online (Sandbox Code Playgroud)
你有它!
如果您通过Homebrew安装python3,它默认安装最新版本,我做了.但我想要3.3而不是3.4.如何使用Homebrew将其替换为3.3?我想用Python 3尝试Django,但我只是学习Django所以我想使用最新的稳定版本,目前是1.6,它与Python 3.3兼容.我想在Python 3中使用它,所以它必须是3.3.Django 1.7与Py3.4兼容,但我不想搞砸它,直到它稳定......在OS X 10.8.5上
我以前在 Virtualbox 中使用过 Vagrant,但 VB 不能在这台计算机上运行,所以我想我会尝试不同的方法,但我不太理解这个软件集群,它们的用途是单独和相互依赖的......我知道 Vagrant 机器可以有 QEMU 或 Libvirt(或 KVM?)提供程序,还有 qemu、qemu-kvm 和 vagrant-libvirt,我只是无法将它们全部划分开来以及它们的互连。我想在我的主机上运行带有同步文件夹的虚拟机。所有这些都是必需的,如何?如果不是,为什么以及如何一起使用?这样我才能更好地理解。在 Debian 10 上
首先,我尝试从网站 ngrok-stable-darwin-amd64.zip 下载。当我尝试通过终端解压缩时,我得到:
Archive: /Users/User/Downloads/ngrok-stable-darwin-amd64.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of /Users/User/Downloads/ngrok-stable-darwin-amd64.zip or
/Users/User/Downloads/ngrok-stable-darwin-amd64.zip.zip, and cannot find /Users/User/Downloads/ngrok-stable-darwin-amd64.zip.ZIP, period.
Run Code Online (Sandbox Code Playgroud)
使用 Unarchiver 解压缩响应:
读取文件“ngrok-stable-darwin-amd64.zip”的内容时出现问题:数据已损坏
尝试了自制路线,brew cask install ngrok,无济于事:
==> Downloading https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-darwin-amd64.z
##### 7.0%
curl: (56) SSLRead() return …Run Code Online (Sandbox Code Playgroud) 我有一个通过其belongsTo('Model')关系继承的模型列表应该固有地属于其相应Model所属的制造商.
这是我的清单模型:
public function model()
{
return $this->belongsTo('Model', 'model_id');
}
public function manufacturer()
{
return $this->belongsTo('Manufacturer', 'models.manufacturer_id');
/*
$manufacturer_id = $this->model->manufacturer_id;
return Manufacturer::find($manufacturer_id)->name;*/
}
Run Code Online (Sandbox Code Playgroud)
和我的制造商型号:
public function listings()
{
return $this->hasManyThrough('Listing', 'Model', 'manufacturer_id', 'model_id');
}
public function models()
{
return $this->hasMany('Model', 'manufacturer_id');
}
Run Code Online (Sandbox Code Playgroud)
我能够在视图中回显$ listing-> model-> name,但不能回显$ listing-> manufacturer-> name.这引发了一个错误.我在上市模型中尝试了注释掉的2行只是为了获得效果,然后我可以回显$ listing-> manufacturer(),这样就行了,但这并没有正确地建立他们的关系.我该怎么做呢?谢谢.
修改了清单模型(感谢回答者):
public function model()
{
return $this->belongsTo('Model', 'model_id');
}
public function manufacturer()
{
return $this->belongsTo('Model', 'model_id')
->join('manufacturers', 'manufacturers.id', '=', 'models.manufacturer_id');
}
Run Code Online (Sandbox Code Playgroud)