Sfumature - gradienti in rettangoli

  1. 8 years ago

    Come si fa a fare delle sfumature in un rettangolo?

    Ho provato il codice CSS:
    .SCRectangle.grad1{
    height: 10px;
    background: rgb(255,255,255);
    background: -moz-linear-gradient(left, rgb(255,255,255) 0%, rgb(252,29,0) 60%, rgb(255,21,0) 100%);
    background: -webkit-gradient(left top, right top, color-stop(0%, rgb(255,255,255)), color-stop(60%, rgb(252,29,0)), color-stop(100%, rgb(255,21,0)));
    background: -o-linear-gradient(left, rgb(255,255,255) 0%, rgb(252,29,0) 60%, rgb(255,21,0) 100%);
    background: -ms-linear-gradient(left, rgb(255,255,255) 0%, rgb(252,29,0) 60%, rgb(255,21,0) 100%);
    background: linear-gradient(to right, rgb(255,255,255) 0%, rgb(252,29,0) 60%, rgb(255,21,0) 100%);
    }
    Applicando al rettangolo grad1 come CSS classe, in Pubcoder viene visualizzata correttamente, ma in preview, in Safari e nell app iOS appare solo un fondino del colore di riempimento del rettangolo.

    Da notare che nella versione prima della 2.2.633 in Safari veniva visualizzato correttamente, ma non nell'app iOS .

    Qualche soluzione?

  2. Giancarlo N

    9 Feb 2016 Administrator
    .SCRectangle.grad1 {
    	height: 10px !important;
    	background: rgb(255,255,255) !important;
    	background: -moz-linear-gradient(left, rgb(255,255,255) 0%, rgb(252,29,0) 60%, rgb(255,21,0) 100%) !important;
    	background: -webkit-gradient(left top, right top, color-stop(0%, rgb(255,255,255)), color-stop(60%, rgb(252,29,0)), color-stop(100%, rgb(255,21,0))) !important;
    	background: -o-linear-gradient(left, rgb(255,255,255) 0%, rgb(252,29,0) 60%, rgb(255,21,0) 100%) !important;
    	background: -ms-linear-gradient(left, rgb(255,255,255) 0%, rgb(252,29,0) 60%, rgb(255,21,0) 100%) !important;
    	background: linear-gradient(to right, rgb(255,255,255) 0%, rgb(252,29,0) 60%, rgb(255,21,0) 100%) !important;
    }
 

or Sign Up to reply!