Home > Web Front-end > CSS Tutorial > Create editable Microsoft Word style documents using pure CSS3

Create editable Microsoft Word style documents using pure CSS3

黄舟
Release: 2017-01-18 13:50:26
Original
2726 people have browsed it

Brief Tutorial

This is an editable Microsoft Word style document made using HTML and CSS3. This special effect provides a set of predefined styles for generating Word-style document effects of various sizes on WEB pages. The styles it provides include:

  • sheets-of-paper-a4.css: A4 paper (21cm × 29.7cm)

  • sheets- of-paper-a3.css:A3 paper(29.7cm × 42cm)

  • ##sheets-of-paper-usletter.css:US letter(21.6cm × 27.9cm)

  • sheets-of-paper-uslegal.css:US legal(21.6cm × 35.6cm)

  • ##sheets-of-paper-ustabloid.css: US tabloid (27.9cm × 43.2cm)
  • Usage method

Introduce the style file of the size you need into the page, if using A4 paper, introduce sheets-of -paper-a4.css file.

<link rel="stylesheet" type="text/css" href="css/sheets-of-paper-a4.css">
Copy after login

HTML structure

Add document class on the element, then use

as the wrapping element, and set the contenteditable="true" attribute for it to make it inside The content can be edited.

<body class="document">
  <div class="page" contenteditable="true">
    ...
  </div>
</body>
Copy after login

The following is a screenshot of the interface of the Word style document effect:

Create editable Microsoft Word style documents using pure CSS3The above is the content of pure CSS3 to create an editable Microsoft Word style document, more For related content, please pay attention to the PHP Chinese website (m.sbmmt.com)!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template