Published
Edited
Dec 5, 2019
1 star
Insert cell
md`# Test: attached CSS attached background Image`
Insert cell
md`## attachments ..`
Insert cell
Insert cell
logo.url()
Insert cell
style = FileAttachment("style.css")
Insert cell
md`## content of attached CCS style.css`
Insert cell
style.text()
Insert cell
md`## (1) <link attached stylesheet style.css>`
Insert cell
html`<link href=${ await FileAttachment("style.css").url() } rel='stylesheet' type='text/css'>`
Insert cell
md`## (2) img with attached CSS + attached background image`
Insert cell
html`<img id='logo'>`
Insert cell
md`## (3) img with attached image`
Insert cell
html`<img src=${ await FileAttachment("favicon-512.png").url() }>`
Insert cell
md`## (4) img with internal CSS + attached background image`
Insert cell
{
html`
#logo{
width : 512px;
height : 512px;
background-image : url( ${ logo.url() } );
background-repeat : no-repeat;
}`
const img = html`<img id='logo'>`
return img
}

Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more