当前位置:首页 > 千层云服务器 > 正文

bootstrap如何禁用按钮

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

bootstrap如何禁用按钮

具体步骤如下:

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>


如果您对该产品感兴趣,请填写办理(客服微信:xiaoxiongyidong)

为您推荐:

发表评论

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

在线客服