2017-01-20 84 views

回答

0

爲了讓您在單擊按鈕時模糊屏幕,您可以使用可覆蓋屏幕高度和寬度的空白div,並使用ng(如果可以以編程方式切換div)。

在HTML:

<div class="mr-blur" ng-if="toggle"></div> 

在CSS:

.mr-blur{ 
height : 100vh;//full viewport height 
width : 100vw;//full viewport width 
background-color : white;//color of the overlay 
opacity : 0.6;//to show a little bit of the iactive screen 
z-index : 9999!important; //To put it on top of all elements 
} 

在JS:

$scope.plusButton = function(){ //function to be called when plus button is clicked 
    $scope.toggle = !$scope.toggle;// 
}