Html 在p标记中使用div会丢失我的样式
我有一个页面,我想在其中向学生表示一个URL(但没有浏览器默认设置,如更改为鼠标悬停上的指针等),我正在丢失我的样式,因为我将文本包装在div中 index.html:Html 在p标记中使用div会丢失我的样式,html,css,Html,Css,我有一个页面,我想在其中向学生表示一个URL(但没有浏览器默认设置,如更改为鼠标悬停上的指针等),我正在丢失我的样式,因为我将文本包装在div中 index.html: <p> we can see Django made us our first url, the admin. Since this file is our url entry point (as declared in `settings.py`), if our hostname is "www.eat-
<p>
we can see Django made us our first url, the admin. Since this file is our url entry point (as declared in `settings.py`), if our hostname is "www.eat-it.com",
<div style="color:blue;">www.eat-it.com/admin</div> is now available. We'll talk more about Django admin later.
</p>
最近我尝试在div中使用.fake url
<p>
we can see Django made us our first url, the admin. Since this file is our url entry point (as declared in `settings.py`), if our hostname is "www.eat-it.com",
<div class="fake-url;">www.eat-it.com/admin</div> is now available. We'll talk more about Django admin later.
</p>
我建议您使用span而不是div,div是块元素,另一方面span是内联元素,更适合您想要使用它的上下文
正如上面提到的,你有一个额外的;在div的类中我建议您使用span而不是div,div是块元素,另一方面,span是内联元素,更适合您想要使用它的上下文
<p>
we can see Django made us our first url, the admin. Since this file is our url entry point (as declared in `settings.py`), if our hostname is "www.eat-it.com",
<div class="fake-url">www.eat-it.com/admin</div> is now available. We'll talk more about Django admin later.
</p>
正如上面提到的,你有一个额外的;在div的类中
<p>
we can see Django made us our first url, the admin. Since this file is our url entry point (as declared in `settings.py`), if our hostname is "www.eat-it.com",
<div class="fake-url">www.eat-it.com/admin</div> is now available. We'll talk more about Django admin later.
</p>
我们可以看到Django为我们创建了第一个url,管理员。由于此文件是我们的url入口点(如“settings.py”中声明的),如果我们的主机名是“www.eat-it.com”,
www.eat-it.com/admin现已提供。稍后我们将进一步讨论Django admin。
只需删除来自div中类名的code>将修复它。
我们可以看到Django为我们创建了第一个url,管理员。由于此文件是我们的url入口点(如“settings.py”中声明的),如果我们的主机名是“www.eat-it.com”,
www.eat-it.com/admin现已提供。稍后我们将进一步讨论Django admin。
只需删除