简体   繁体   中英

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.

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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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