Код:[html] <style> #container { display: grid; grid-gap: 2px; grid: repeat(3, 1fr) / auto-flow; } #container > div { padding: 4px; text-align: center; background-color: #cee; } main{display: inline-grid; padding: 2px; background-color: #666;} </style> <main> <div id="container"> <div>№ п/п</div> <div></div><div></div> <div>Назначение элемента</div> <div></div><div></div> <div>Оригинал</div> <div></div><div></div> <div>Рекомендуемый аналог</div> <div></div><div></div> <div>Правило</div> <div></div><div></div> <div>Пояснение к правилу</div> <div></div><div></div> </div> </main> [/html]
Результат:
[html]
<style>
#container {
display: grid;
grid-gap: 2px;
grid: repeat(3, 1fr) / auto-flow;
}
#container > div {
padding: 4px;
text-align: center;
background-color: #cee;
}
main{display: inline-grid; padding: 2px; background-color: #666;}
</style>
<main>
<div id="container">
<div>№ п/п</div>
<div></div><div></div>
<div>Назначение элемента</div>
<div></div><div></div>
<div>Оригинал</div>
<div></div><div></div>
<div>Рекомендуемый аналог</div>
<div></div><div></div>
<div>Правило</div>
<div></div><div></div>
<div>Пояснение к правилу</div>
<div></div><div></div>
</div>
</main>
[/html]
Код:[html] <style> #container {padding: 2px; transform: scale(0.8); display: inline-grid; grid-gap: 2px; grid-template-columns: auto auto auto auto auto auto; background-color: #666; } #container > div {padding: 4px; text-align: center; background-color: #cee; } </style> <div id="container"> <div>№ п/п</div><div>Назначение элемента</div><div>Оригинал</div> <div>Рекомендуемый аналог</div><div>Правило</div><div>Пояснение к правилу</div> <div>1</div> <div><svg viewBox="0 0 100 200" width="100" height="200"> <text x="5" y="20" width="40" height="20">Микроид</text> <rect id="нету" x="5" y="50" width="80" height="40" fill="#c52" /> </svg></div> <div></div> <div><svg viewBox="0 0 200 200" width="200" height="200"> <symbol id="penta" width="200" height="200" viewBox="0 0 200 200" > <polygon id="star" points="100,0 40,180 195,70 5,70 160,180" style="cursor: pointer; fill-rule: nonzero; fill: #aabb00; stroke: none; stroke-width: 1px;"/> </symbol> <use xlink:href="#penta" x="0" y="0" width="200" height="200"></use> <animate xlink:href="#penta" attributeType="XML" attributeName="viewBox" from="0 0 200 200" to="0 0 2000 2000" dur="0.8s" begin="нету.click" fill="freeze" /> <animate xlink:href="#penta" attributeType="XML" attributeName="viewBox" from="0 0 2000 2000" to="0 0 200 200" dur="0.8s" begin="есть.click" fill="freeze" /> </svg></div> <div></div> <div>Минимизация<br>элементов</div> <div>2</div> <div><svg viewBox="0 0 100 200" width="100" height="200"> <text x="5" y="20" width="40" height="20">Мaкроид</text> <rect id="есть" x="5" y="50" width="80" height="40" fill="#5c2" /> </svg></div> <div></div><div><svg viewBox="0 0 200 200" width="200" height="200"> <symbol id="penta" width="200" height="200" viewBox="0 0 200 200" > <polygon id="star" points="100,0 40,180 195,70 5,70 160,180" style="cursor: pointer; fill-rule: nonzero; fill: #aabb00; stroke: none; stroke-width: 1px;"/> </symbol> <use xlink:href="#penta" x="0" y="0" width="200" height="200"></use> <animate xlink:href="#penta" attributeType="XML" attributeName="viewBox" from="0 0 200 200" to="0 0 2000 2000" dur="0.8s" begin="нету.click" fill="freeze" /> <animate xlink:href="#penta" attributeType="XML" attributeName="viewBox" from="0 0 2000 2000" to="0 0 200 200" dur="0.8s" begin="есть.click" fill="freeze" /> </svg></div> <div></div> <div>Максимизация<br>элементов</div> </div> [/html]
Результат:[html]
<style>
#container
{display: inline-grid;
padding: 2px;
transform: scale(0.8);
grid-gap: 2px;
grid-template-columns: auto auto auto auto auto auto;
background-color: #666;
}
#container > div
{padding: 4px;
text-align: center;
background-color: #cee;
}
</style>
<div id="container">
<div>№ п/п</div><div>Назначение элемента</div><div>Оригинал</div>
<div>Рекомендуемый аналог</div><div>Правило</div><div>Пояснение к правилу</div>
<div>1</div>
<div><svg viewBox="0 0 100 200" width="100" height="200">
<text x="5" y="20" width="40" height="20">Микроид</text>
<rect id="нету" x="5" y="50" width="80" height="40" fill="#c52" />
</svg></div>
<div></div>
<div><svg viewBox="0 0 200 200" width="200" height="200">
<symbol id="penta" width="200" height="200" viewBox="0 0 200 200" >
<polygon id="star" points="100,0 40,180 195,70 5,70 160,180"
style="cursor: pointer; fill-rule: nonzero; fill: #aabb00; stroke: none; stroke-width: 1px;"/>
</symbol>
<use xlink:href="#penta" x="0" y="0" width="200" height="200"></use>
<animate xlink:href="#penta" attributeType="XML" attributeName="viewBox"
from="0 0 200 200" to="0 0 2000 2000" dur="0.8s"
begin="нету.click" fill="freeze" />
<animate xlink:href="#penta" attributeType="XML" attributeName="viewBox"
from="0 0 2000 2000" to="0 0 200 200" dur="0.8s"
begin="есть.click" fill="freeze" />
</svg></div>
<div></div>
<div>Минимизация<br>элементов</div>
<div>2</div>
<div><svg viewBox="0 0 100 200" width="100" height="200">
<text x="5" y="20" width="40" height="20">Мaкроид</text>
<rect id="есть" x="5" y="50" width="80" height="40" fill="#5c2" />
</svg></div>
<div></div><div><svg viewBox="0 0 200 200" width="200" height="200">
<symbol id="penta" width="200" height="200" viewBox="0 0 200 200" >
<polygon id="star" points="100,0 40,180 195,70 5,70 160,180"
style="cursor: pointer; fill-rule: nonzero; fill: #aabb00; stroke: none; stroke-width: 1px;"/>
</symbol>
<use xlink:href="#penta" x="0" y="0" width="200" height="200"></use>
<animate xlink:href="#penta" attributeType="XML" attributeName="viewBox"
from="0 0 200 200" to="0 0 2000 2000" dur="0.8s"
begin="нету.click" fill="freeze" />
<animate xlink:href="#penta" attributeType="XML" attributeName="viewBox"
from="0 0 2000 2000" to="0 0 200 200" dur="0.8s"
begin="есть.click" fill="freeze" />
</svg></div>
<div></div>
<div>Максимизация<br>элементов</div>
</div>
[/html]