簡體   English   中英

在Ionic中帶有圓角的警報

[英]alert with rounded corners in Ionic

我創建了一個警報,但是我想做的最后一件事就是使轉角變圓。 這是我在app.scss中的CSS代碼:

    .my-class {
  .alert-head {
    background-color: white;
    height: 95px;
  }
  .alert-message {
    font-size: 20px;
  }
  .alert-button {
    color: dodgerblue;
    margin-right: 100px;
    font-family: "OpenSans";
    font-size: 22px;
  }
  .alert-title {
    text-align: center;
    font: bolder;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  }
  .alert-subTitle {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  }

簡單地,您可以將此代碼添加到要舍入它的任何元素yourselector { border-radius: 5 px; } yourselector { border-radius: 5 px; }如果不起作用,您可以使用它來強制它接受您的樣式yourselector { border-radius: 5 px !important; } yourselector { border-radius: 5 px !important; }

而且,您還應該為這樣編寫的每個選擇器編寫類名

 .my-class .alert-head { background-color: white; height: 95px; } .my-class .alert-message { font-size: 20px; } .my-class .alert-button { color: dodgerblue; margin-right: 100px; font-family: "OpenSans"; font-size: 22px; } .my-class .alert-title { text-align: center; font: bolder; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; } .my-class .alert-subTitle { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; } 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM