W
W
Web Lizard2016-08-30 19:04:22
PHP
Web Lizard, 2016-08-30 19:04:22

Is it possible to calculate the size of containers on the calculator?

Is it possible or is it done in some other way?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Дмитрий Беляев, 2016-06-23
@bingo347 Куратор тега JavaScript

var text = `Text
< asd >
< asd >
<>
< asd >
<>
<>
<>`;

var total = text.match(/<.*>/gm).length;
var asd = text.match(/<\s*asd\s*>/gm).length;

console.log(`${asd}/${total}`);

D
Dmitry, 2016-06-23
@slo_nik

Try starting with this:
$pattern = '#<\s*([az]+)\s*>#is';

V
Vladislav Polyakov, 2016-08-30
@Lizard-108

Let's go,
Border + margin + padding + container body.
The border may not be taken into account if the css rule is box-sizing: border-box;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question