md-datepicker 忽略自定义边距
md-datepicker is ignoring the custom margin
我在我的项目中使用 AngularJS Material 日期选择器,我正在使用一些自定义的 CSS 它 md-datepicker
不幸的是忽略了。
这是一个片段:
angular.module('myApp',['ngMaterial'])
body{background-color:white}
.datePicker{
margin-top:100px;
}
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Angular Material style sheet -->
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/angular_material/1.1.0/angular-material.min.css">
</head>
<body ng-app="myApp" >
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular-animate.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular-aria.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular-messages.min.js"></script>
<!-- Angular Material Library -->
<script src="https://ajax.googleapis.com/ajax/libs/angular_material/1.1.0/angular-material.min.js"></script>
<label>User Date</label><br>
<md-datepicker ng-model='userDate' class="datePicker md-primary"></md-datepicker>
</body>
正在占用,但是display
不对。设置右边的display
为<md-datepicker>
:
.datePicker {
margin-top: 100px;
display: block;
}
预览
我在我的项目中使用 AngularJS Material 日期选择器,我正在使用一些自定义的 CSS 它 md-datepicker
不幸的是忽略了。
这是一个片段:
angular.module('myApp',['ngMaterial'])
body{background-color:white}
.datePicker{
margin-top:100px;
}
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Angular Material style sheet -->
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/angular_material/1.1.0/angular-material.min.css">
</head>
<body ng-app="myApp" >
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular-animate.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular-aria.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular-messages.min.js"></script>
<!-- Angular Material Library -->
<script src="https://ajax.googleapis.com/ajax/libs/angular_material/1.1.0/angular-material.min.js"></script>
<label>User Date</label><br>
<md-datepicker ng-model='userDate' class="datePicker md-primary"></md-datepicker>
</body>
正在占用,但是display
不对。设置右边的display
为<md-datepicker>
:
.datePicker {
margin-top: 100px;
display: block;
}
预览