0
我有一個頁腳圖像,點擊返回到主頁。 但是,圖像應始終可見。所以當移動鍵盤出現時,圖像應該跳到鍵盤上方。如何使頁腳圖像跳轉到移動鍵盤上
任何想法如何做到這一點?
編輯:
這裏是我的指令累,但手機鍵盤時會出現圖像不向上移動。鍵盤隱藏圖像:
(function() {
'use strict';
angular
.module('TestApp')
.directive('stickyText', ['$mdSticky', stickyText]);
function stickyText($mdSticky) {
return {
restrict: 'E',
template: '<span style="position: absolute; right: 0; bottom: 0;"> <img src="assets/img/icons/home.png" style="width:40px;height:40px;"> </span>',
link: function (scope, element) {
$mdSticky(scope, element);
}
}
}
})();
HTML代碼:
<sticky-text ui-sref="home"> </sticky-text>
你能分享css代碼嗎? –
我同意@Rocky,我們需要看看你現在有什麼CSS。 – George
你好,我添加了我爲粘性圖像寫的指令。 CSS只包含「position:absolute; right:0; bottom:0;」將圖像定位在右下角 – Veela