Angularjs ios和android混合移动应用中图像分辨率/像素大小的最佳实践?
在ios和android的混合(Ionic和React Native)应用程序中,全屏图像的图像分辨率/像素大小的最佳实践是什么?如何处理不同的屏幕尺寸?您是否会像在web上一样为不同的屏幕生成不同的图像?或者你只使用一种图像大小,然后如何处理由此产生的问题?您使用的像素大小是多少Angularjs ios和android混合移动应用中图像分辨率/像素大小的最佳实践?,angularjs,cordova,ionic-framework,Angularjs,Cordova,Ionic Framework,在ios和android的混合(Ionic和React Native)应用程序中,全屏图像的图像分辨率/像素大小的最佳实践是什么?如何处理不同的屏幕尺寸?您是否会像在web上一样为不同的屏幕生成不同的图像?或者你只使用一种图像大小,然后如何处理由此产生的问题?您使用的像素大小是多少 谢谢。通过此指令,我克服了Tinder profile kind应用程序中的图像拉伸问题 app.directive('resize', function ($window) { return functi
谢谢。通过此指令,我克服了Tinder profile kind应用程序中的图像拉伸问题
app.directive('resize', function ($window) {
return function (scope, element) {
var w = angular.element($window);
scope.getWindowDimensions = function () {
return { 'h': w.height(), 'w': w.width() };
};
scope.$watch(scope.getWindowDimensions, function (newValue, oldValue) {
scope.windowHeight = newValue.h;
scope.windowWidth = newValue.w-30;
scope.style = function () {
return {
'height': (newValue.h - 100) + 'px',
'width': (newValue.w - 100) + 'px'
};
};
}, true);
w.bind('resize', function () {
scope.$apply();
});
}
})
通过这个指令,我克服了Tinder profile kind应用程序中的图像拉伸问题
app.directive('resize', function ($window) {
return function (scope, element) {
var w = angular.element($window);
scope.getWindowDimensions = function () {
return { 'h': w.height(), 'w': w.width() };
};
scope.$watch(scope.getWindowDimensions, function (newValue, oldValue) {
scope.windowHeight = newValue.h;
scope.windowWidth = newValue.w-30;
scope.style = function () {
return {
'height': (newValue.h - 100) + 'px',
'width': (newValue.w - 100) + 'px'
};
};
}, true);
w.bind('resize', function () {
scope.$apply();
});
}
})
你的意思是为不同的设备进行图像调整吗?您好,是的。如果这是您的u的要求,可以通过一个指令读取设备屏幕宽度并调整我们的图像分区。您的意思是为不同的设备进行图像调整吗?您好,是的,完全正确。如果这是您的要求,您可以通过一个指令读取设备屏幕宽度并调整我们的图像分区