Libraryless. Click here for Pure Java version (3057L/18K).
1 | // for this to work, also add body { margin: 0 and padding: 0 }
|
2 | sS style_fullScreenBackgroundImage(S imgURL) {
|
3 | ret replaceDollarVars(newLinesToSpaces_trim([[ |
4 | background-image: url('$imgURL');
|
5 | background-repeat: no-repeat; |
6 | background-size: contain; |
7 | background-position: center; |
8 | height: 100vh; |
9 | width: 100vw; |
10 | z-index: 0; |
11 | ]]), +imgURL); |
12 | } |
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1030494 |
| Snippet name: | style_fullScreenBackgroundImage |
| Eternal ID of this version: | #1030494/3 |
| Text MD5: | c23d58300696dab37dddc28220ca4fe5 |
| Transpilation MD5: | f5f76193d679384b64a48b176166e523 |
| Author: | stefan |
| Category: | javax / css |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-12-28 02:20:15 |
| Source code size: | 377 bytes / 12 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 359 / 482 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |