0
私はAngularJSを初めて使い、ウィンドウスクロールでbodyタグのCSSスタイルの値を変更する指示をしました。これは指令です:AngularJSディレクティブからボディCSSスタイルのプロパティを変更する
app.directive("parallaxDir", function ($window, $document) {
return function (scope, element, attrs) {
angular.element($window).bind("scroll", function() {
console.log('Scroll in da directive');
** Here I want to modify the body tag css style to: **
** background-position-y = $window.pageYOffset/2) + "px") **
});
};
});
どうすればよいですか?
ありがとうございます。