Html 在不同浏览器中定位问题
我有一个段落在浏览器中看起来非常左,但在firefox和chrome中很好,我已经尝试解决这个问题一段时间了,但我似乎无法让它在所有浏览器中正确显示 代码笔: HTMLHtml 在不同浏览器中定位问题,html,css,Html,Css,我有一个段落在浏览器中看起来非常左,但在firefox和chrome中很好,我已经尝试解决这个问题一段时间了,但我似乎无法让它在所有浏览器中正确显示 代码笔: HTML }在主CSS脚本之前,您可能应该在标题中包含一个浏览器样式重置CSS。这些类型的脚本将浏览器CSS样式重置为不同样式之间的统一样式 我可以推荐 但是外面有很多 看起来主要是因为IE不支持fit内容 .info{ 明确:两者皆有; 位置:固定; 排名:0; 左:50%; 保证金:自动; 最高:70%; 转换:翻译(-50%,-5
}在主CSS脚本之前,您可能应该在标题中包含一个浏览器样式重置CSS。这些类型的脚本将浏览器CSS样式重置为不同样式之间的统一样式 我可以推荐
但是外面有很多 看起来主要是因为IE不支持
fit内容
.info{
明确:两者皆有;
位置:固定;
排名:0;
左:50%;
保证金:自动;
最高:70%;
转换:翻译(-50%,-50%);
文本对齐:居中;
颜色:黑色;
字体系列:“Comfortaa”,草书;
填充:10px;
字体:斜体;
字号:700;
字体大小:16px;
文本对齐:居中;
背景色:rgba(255、255、255、1);
边框:2件纯黑;
边界半径:50px;
}
欢迎来到我作品集的编程部分,
在这里,您可以找到指向我的github配置文件的链接。我所有的编程工作都是如此。
还有一个链接指向我使用JavaScript创建的有奖蛇游戏。
我所熟悉的语言包括html、css、javascript、php、mysql、java、python和c++
尝试下面给出的代码。只需复制并粘贴原样即可。我希望它能很好地工作。
.info{
位置:相对位置;
显示:块;
顶部:500px;
保证金:自动;
转化:translateY(-50%);
文本对齐:居中;
颜色:黑色;
字体系列:“Comfortaa”,草书;
填充:10px;
字体:斜体;
字号:700;
字体大小:16px;
背景色:rgba(255255,1);
宽度:50%;
宽度:适合的内容;
高度:适合的内容;
边框:2件纯黑;
边界半径:50px;
宽度:-moz最大含量;
宽度:-网络工具包最大内容;
}
欢迎来到我的投资组合中的编程部分,
在这里,您可以找到指向我的github配置文件的链接。我所有的编程工作都是如此。
还有一个链接指向我使用JavaScript创建的有奖蛇游戏。
我所学的语言包括HTML、CSS、JavaScript、PHP、MySQL、java、Python和C++。
以前从未听说过这一点,所以我会看看,谢谢
<p class = "info">Welcome to the programming part of my portfolio,<br>
here you can find a link to my github profile all of my programming work is.<br>
There is also a link to a bonus Snake game I created using JavaScript.<br>
the languages I am experienced in include html,css,javascript,php,mysql,java,python and c++</p>
.info{
clear:both;
position: fixed;
display:block;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
top: 70%;
transform: translateY(-50%);
text-align: center;
color: black;
font-family: 'Comfortaa', cursive;
padding: 10px;
font-style: italic;
font-weight: 700;
font-size: 16px;
text-align: center;
background-color: rgba(255,255,255, 1);
width: fit-content;
height: fit-content;
border: 2px solid black;
border-radius: 50px;
width: -moz-max-content;
width: -webkit-max-content;
display: table;
Try the code given below. just copy and paste it as it is. I hope it will work fine.
<html>
<head>
<style>
.info{
position: relative;
display:block;
top: 500px;
margin: auto;
transform: translateY(-50%);
text-align: center;
color: black;
font-family: 'Comfortaa', cursive;
padding: 10px;
font-style: italic;
font-weight: 700;
font-size: 16px;
background-color: rgba(255,255,255, 1);
width: 50%;
width: fit-content;
height: fit-content;
border: 2px solid black;
border-radius: 50px;
width: -moz-max-content;
width: -webkit-max-content;
}
</style>
</head>
<body>
<p class = "info">Welcome to the programming part of my portfolio,<br>
here you can find a link to my github profile all of my programming work is.<br>
There is also a link to a bonus Snake game I created using JavaScript.<br>
the languages I am experienced in include html,css,javascript,php,mysql,java,python and c++
</p>
</body>
</html>