Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我从所有其他弹出窗口的 CSS 背景颜色更改弹出类的背景颜色,我在 ionic 中创建了一个自定义弹出窗口。我只想更改自定义弹出窗口的背景颜色。
您可以添加cssClass到该$ionicPopup.show方法:
cssClass
$ionicPopup.show
$ionicPopup.show({ template: '', title: '', subTitle: '', cssClass: 'myPopup', scope: $scope, ...
并且此类将出现在生成的 html 中,如下所示:
我在 show 方法中为我的弹出窗口创建了自定义 CSS,例如
我的自定义 CSS 如下
.myPopup .popup{ //write your code here } .myPopup .popup-body{ // Write your css here }
这对我有用。