"."/> ".">
Home >Web Front-end >Front-end Q&A >What does caret stand for in bootstrap?
In bootstrap, caret represents the triangle symbol icon; adding the "caret" class to an element will give the element a triangle symbol icon to indicate that the specified element has the function of a drop-down menu and pops up. In the menu, the triangle symbol will automatically be displayed in reverse, and the syntax is "
".
The operating environment of this tutorial: Windows10 system, bootstrap5 version, DELL G3 computer
In bootstrap, caret represents the triangle symbol icon
Add the .caret class to an element and it will be given a triangle symbol Icon used to indicate that an element has the function of a drop-down menu.
And, in the menu that pops up, the triangle symbol will automatically be displayed in reverse. For example:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <!-- IE将使用最新的引擎渲染网页 --> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <!-- 页面的宽度与设备屏幕的宽度一致 初始缩放比例 1:1 --> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Demo</title> <meta name="author" content="www.cnblogs.com/kemingli"> <!-- 引入外部bootstrap的css文件(压缩版),版本是3.3.7 --> <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css"> <!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询(media queries)功能 --> <!-- 警告:通过 file:// 协议(就是直接将 html 页面拖拽到浏览器中)访问页面时 Respond.js 不起作用 --> <!--[if lt IE 9]> <script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script> <![endif]--> </head> <body> <!-- start : demo --> <div> <!-- span空着,不写内容 --> <span></span> </div> <!-- end : demo --> <!-- NO.1 加载框架依赖的jQuery文件(压缩版),版本是1.12.4 --> <script src="bootstrap/js/jquery.min.js"></script> <!-- NO.2 加载Bootstrap的所有JS插件,版本是3.3.7 --> <script src="bootstrap/js/bootstrap.min.js"></script> </body> </html>
Output result:
Related recommendations: bootstrap tutorial
The above is the detailed content of What does caret stand for in bootstrap?. For more information, please follow other related articles on the PHP Chinese website!