简体   繁体   中英

Create a full screen ion-button with span tags inside with display:block

I have an Ionic Button full screen div that has other span tags inside it. I tried using
I tried using display:block but no matter what the words center inline the middle. How can I add make my spans a display:block item?

Html

<ion-content padding>
   <div ion-button (tap)="onTap()" class="buttNext">
     <span class="fullButt">{{corrObj.isCorr}}</span>
     <span class="fullButt">Score is {{corrObj.score}}</span>
     <span class="fullButt">Tap Screen to continue</span>
   </div>
 </ion-content>

CSS

.buttNext{
  height:100vh;
  width:100vw;
  opacity:1;
  background:gray;
 }

.fullButt{
  display: block;
  background: none;
  font-size:30px;
  color:white;
 }

Instead of making a button fill the screen instead I just made the a button itself. This worked perfect for me and accomplished what I needed

<ion-content padding (tap)="onTap()" id="fullAns">
 <div class="ansCont">
   <span id="correct" class="fullButt">{{corrObj.isCorr}}</span>
   <span id="score" class="fullButt">Score is {{corrObj.score}}</span>
   <span id="tap" class="fullButt">Tap Anywhere to continue</span>
 </div>
</ion-content>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM