nastya97core,
шифровка из центра ...
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
.head-line {
font-size: 24px;
color: #000000;
width: 600px;
height: 400px;
background-color: #BDB76B;
}
</style>
<script>
document.addEventListener("DOMContentLoaded", function() {
function replaceCss(k, n) {
for (var f = document.styleSheets, c = 0; c < f.length; c++) {
var rule = "";
for (var b = f[c].cssRules, a = 0; a < b.length; a++) {
if (b[a].selectorText == k) {
b[a].cssText.replace(/(\S+)\s*:\s*(\d+)px/g, function(a, p, num) {
rule += p + ": " + ((num / n).toFixed(3) + "vw; ");
});
}
}
if (rule) {
f[c].insertRule(k + " {" + rule + "}", 1);
}
}
}
replaceCss(".head-line", 12.8);
})
</script>
</head>
<body>
<div class="head-line"></div>
</body>
</html>