2
I’m making a website that needs to pick up a svg from another site (www.teste.com.br/image.svg) and set it as the background. But I’m not getting it.
go on like I’m doing:
   <html>
    <head>
        <meta charset="utf-8" />
        <meta name="format-detection" content="telephone=no" />
        <!-- WARNING: for iOS 7, remove the width=device-width and height=device-height     attributes. See https://issues.apache.org/jira/browse/CB-4323 -->
       <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
       <link rel="stylesheet" type="text/css" href="css/index.css" />
    </head>
    <body>
        <div class="fullscreen">
            <iframe id="data"></iframe>
        </div>
        <script src="js/jquery-1.9.1.min.js"></script>
        <script type="text/javascript">
           var div = document.getElementById('data');
           var data = new Date();
           var d = new Date();
           var mes = d.getMonth()+1;
           var dia = d.getDate();
           /// alterando o src
           var imagem = 'http://www.teste.com.br/clientes/svg/' + '01' + '/' + '01' + '.svg';
           div.style = 'background-image:url('+imagem+')';
       </script>
    </body>
 </html>
Lamppost
htmlalso.– Fernando Leal
follows my html:)
– peterq
You want to set the background of
divor ofiframe?– Fernando Leal
Of a div.. I put wrong I will edit hehehe
– peterq