如何在Bootstrap的下拉菜单中删除箭头? | 您所在的位置:网站首页 › 卸载bootstrap › 如何在Bootstrap的下拉菜单中删除箭头? |
下拉菜单是任何Web应用程序不可或缺的重要组成部分之一。 Bootstrap提供了该组件自己的交互式版本。可以通过单击而不是将鼠标悬停来切换引导程序下拉列表,因为这是故意设计的决定。要在Web项目中使用下拉菜单,请将Popper.js包含到项目中。 每个Bootstrap下拉按钮或链接在CSS中都有一个:: after选择器。 :: after选择器通常用于在元素内容之后插入一些文本。在这种情况下,内容是一个下拉箭头。要删除它,只需使内容变为“ none”即可。 句法: .my-dropdown-toggle::after { content: none; }可以使用此功能在顶部导航栏中创建导航菜单。这是显示操作方法的完整示例。范例1: Remove Dropdown Arrow .dropdown-toggle::after { content: none; } Dropdown button Action Another action Something else here输出: 示例2:删除下拉列表中的箭头,并更改类名。 Remove Dropdown Arrow Dropdown button Action Another action Something else here输出: |
CopyRight 2018-2019 实验室设备网 版权所有 |