简体   繁体   English

角材料 md 按钮不起作用

[英]Angular Material md-button not working

I have created a html page and used angular material for responsiveness but when i try to add a button using md-button it does not work but md-card is working fine.我创建了一个 html 页面并使用了角度材料来提高响应能力,但是当我尝试使用 md-button 添加按钮时,它不起作用,但 md-card 工作正常。

I have included all the files shown below我已经包含了下面显示的所有文件

Blockquote块引用

 <!DOCTYPE html> <html> <head> <title>Image preview App</title> <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-material.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-animate.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-aria.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-messages.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-material.min.js"></script> <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> </head> <body ng-app> <md-card style="width:50%;height:300px;"> <md-button>button</md-button> </md-card> </body> </html>

You are not seeing it because it does not get highlighted, apply a style您没有看到它,因为它没有突出显示,应用样式

 <md-card style="width:50%;height:300px;">
        <md-button class="md-raised next-btn">button</md-button>
 </md-card>

DEMO演示

Maybe your background is white and your button color is white.也许你的背景是白色的,你的按钮颜色是白色的。 Try changing the color of one or the other.尝试更改其中一个的颜色。

<md-button style="color: #662D91;">button</md-button>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM