在此上下文中,不允许HTML元素样式作为元素部分的子元素

时间:2017-05-04 08:46:35

标签: html css

错误:元素样式在此上下文中不允许作为元素部分的子元素。

代码:

<section class="wrapper style4 container">
<h2 style="font-family:calibri;opacity:.0;">
    something here
</h2>

<!-- Content -->
<div class="content">
    <section>
        <h2 style="font-family:calibri;">something here</h2>
        <p style="font-family:calibri;">
            something here
        </p>
        <style>
            table {
                width: 100%;
            }

            table, th, td {
                border: 1px solid black;
                border-collapse: collapse;
            }

            th, td {
                padding: 5px;
                text-align: left;
            }

            table#t01 tr:nth-child(even) {
                background-color: #eee;
            }

            table#t01 tr:nth-child(odd) {
                background-color: #fff;
            }

            table#t01 th {
                background-color: black;
                color: white;
            }
        </style>
    </section>
</div>

有人可以帮我解决错误吗?

0 个答案:

没有答案