2017-08-01 12 views
0

Ionic 3でハイブリッドアプリをデプロイしています。イオンタイトルテキストを右から左にスライドさせたいと思います。それがモバイル上にある場合、テキストはすべて表示されません(切り捨てられます)。
どうすればよいですか?css ionic 3アニメーションテキスト(右から左にスライドする)すべてが可視でない場合

+0

からこれを貼り付け、あなたは全体で常にスクロールのような意味ですか? –

答えて

0

だけコピーしてhttps://www.quackit.com/html/codes/scrolling_text.cfm

<!DOCTYPE html> 
<title>Example</title> 

<!-- Styles --> 
<style style="text/css"> 
.example1 { 
height: 50px; 
overflow: hidden; 
position: relative; 
} 
.example1 h3 { 
font-size: 3em; 
color: limegreen; 
position: absolute; 
width: 100%; 
height: 100%; 
margin: 0; 
line-height: 50px; 
text-align: center; 
/* Starting position */ 
-moz-transform:translateX(100%); 
-webkit-transform:translateX(100%);  
transform:translateX(100%); 
/* Apply animation to this element */ 
-moz-animation: example1 15s linear infinite; 
-webkit-animation: example1 15s linear infinite; 
animation: example1 15s linear infinite; 
} 
/* Move it (define the animation) */ 
@-moz-keyframes example1 { 
0% { -moz-transform: translateX(100%); } 
100% { -moz-transform: translateX(-100%); } 
} 
@-webkit-keyframes example1 { 
0% { -webkit-transform: translateX(100%); } 
100% { -webkit-transform: translateX(-100%); } 
} 
@keyframes example1 { 
0% { 
-moz-transform: translateX(100%); /* Firefox bug fix */ 
-webkit-transform: translateX(100%); /* Firefox bug fix */ 
transform: translateX(100%);  
} 
100% { 
-moz-transform: translateX(-100%); /* Firefox bug fix */ 
-webkit-transform: translateX(-100%); /* Firefox bug fix */ 
transform: translateX(-100%); 
} 
} 
</style> 

<!-- HTML --> 
<div class="example1"> 
<h3>Scrolling text... </h3> 
</div> 
関連する問題