dimanche 5 mars 2017

HTML/CSS Need help setting variable for simple circle graph

Below is the code that I am having issues with. I have attempting to set a variable with php that CSS would read. I'm not new to coding, but I am new to web development as of 4 days ago.

  <?php
    $perc = "70";
    header("Content-type: text/css; charset: UTF-8");
    ?>

    <style>
    .pie {
      width: 100px; 
      height: 100px;
      border-radius: 50%;
      background: green;
      background-image:
      linear-gradient(to right, transparent <?php echo $perc ?>, #499 0);
    }




Aucun commentaire:

Enregistrer un commentaire