Linux 拨号vps windows公众号手机端

bootstrap如何禁用按钮

lewis 6年前 (2019-04-05) 阅读数 10 #程序编程
文章标签 bootstrap

使用bootstrap实现禁用按钮的方法:1.新建html文件,引入bootstrap;2.在文件中按钮;3.设置disabled属性禁用按钮;


具体步骤如下:

1.首先,新建一个html文件,并在文件中引入bootstrap;

<!DOCTYPEhtml>

<html>

<head>

<title>Document</title>

<linkrel="stylesheet"href="bootstrap.min.css">

<style></style>

</head>

<body>

</body>

</html>

2.bootstrap引入后,在文件中添加一个按钮;

<!DOCTYPEhtml>

<html>

<head>

<title>Document</title>

<linkrel="stylesheet"href="bootstrap.min.css">

<style></style>

</head>

<body>

<buttontype="button">按钮</button>

</body>

</html>

3.最后,按钮添加好后,为按钮添加一个class类,设置disabled属性即可禁用按钮;

<!DOCTYPEhtml>

<html>

<head>

<title>Document</title>

<linkrel="stylesheet"href="bootstrap.min.css">

<style></style>

</head>

<body>

<buttontype="button"class="disabled">按钮</button>

</body>

</html>


版权声明

本文仅代表作者观点,不代表米安网络立场。

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

热门