E
E
EvgenyMorozov2015-08-20 15:25:40
css
EvgenyMorozov, 2015-08-20 15:25:40

How to pack in html file: images, css and js?

Good afternoon
Tell me, is there a technology that: will take a page with connected css and js, fonts and pictures, etc., and will give out a large, but only html file .
Perhaps pictures and fonts should not be embedded, but scripts and styles are a must.
What you need: to replace flash in the production of banners and text-graphic blocks.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
mr-molodoy, 2015-08-20
@mr-molodoy

Good day.
For example, you can not connect styles, but place them in a
JavaScript tag, place them in an
Image tag as a background in css, you can set the following. way:
Images on the page can be placed in the same way
Fonts in css:

@font-face {
    font-family: 'FontName';
    src: url(data:font/truetype;charset=utf-8;base64,{{base64_content}}) format('truetype'),
         url(data:font/woff;charset=utf-8;base64,{{base64_content}}) format('woff');
}

Where {{base64_content}} is the base64 encoded image.
You can encode here b64.io

A
Anton, 2015-08-20
@sHinE

Are you asking about a specific tool or how to theoretically do this?
If theoretically - then styles can be written either
or inline
With scripts - similarly, there is a
Pictures tag - google data uri.

D
Denis Ineshin, 2015-08-20
@IonDen

This is all superfluous, at the moment, rich banners are quite embedded on pages as a single iframe.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question