[CREATE] a question to the SVG experts out there
Doug Schepers
doug at schepers.cc
Tue Oct 27 07:21:49 PDT 2009
Hi, Andre-
Andre "Osku" Schmidt wrote (on 10/27/09 9:10 AM):
> On Tue, 2009-10-27 at 08:36 -0400, Doug Schepers wrote:
>> In theory, this should work:
>>
>> bg.svg
>> <svg xmlns="http://www.w3.org/2000/svg"
>> width="100%" height="100%" viewBox="0 0 400 400">
>> <!-- some graphic elements here -->
>> </svg>
>>
>> style.css
>> body {
>> background-image: url('bg.svg');
>> }
>
> and in practice, it seems only this works (ATM), and only in firefox
>
> html:
> <object type="image/svg+xml" data="bg.svg"
> width="100%" height="100%"></object>
>
> css:
> object {
> position:absolute;
> top:0;
> left:0;
> z-index:-1;
> }
>
> but the object wont scale beyond visible view.
> (eg. when the html content makes the browser to have scrollbars)
>
> http://osku.de/svg/bg-test1.html
That's a clever workaround, but I'm not sure I'd call that a
"background", in the CSS sense. Obviously, if it works for your use
case, then go with it. :)
Regards-
-Doug
More information about the CREATE
mailing list