Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/82.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/39.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 在CSS中,为什么文本对齐:-当文本对齐时webkit center对我有效:中心;不是吗? 我正在制作SharePoint 2010页,下面的代码是在页面中间成功地对表进行定心,但是当我从代码中删除-WebKIT时,它不再是中心。为什么文本不对齐:居中;工作另一件奇怪的事情是-webkit-只在Chrome中进行居中工作。在所有其他浏览器中,将此表居中似乎是不可能的 <style> .s4-wpcell-plain{ text-align: -webkit-center; } </style> <table style="width:100%" cellpadding="0" cellspacing="0"> <tbody> <tr> <td id="MSOZoneCell_WebPartWPQ2" valign="top" class="s4-wpcell-plain"> <!-- content --> </td> </tr> </tbody> </table>_Html_Css_Webkit - Fatal编程技术网

Html 在CSS中,为什么文本对齐:-当文本对齐时webkit center对我有效:中心;不是吗? 我正在制作SharePoint 2010页,下面的代码是在页面中间成功地对表进行定心,但是当我从代码中删除-WebKIT时,它不再是中心。为什么文本不对齐:居中;工作另一件奇怪的事情是-webkit-只在Chrome中进行居中工作。在所有其他浏览器中,将此表居中似乎是不可能的 <style> .s4-wpcell-plain{ text-align: -webkit-center; } </style> <table style="width:100%" cellpadding="0" cellspacing="0"> <tbody> <tr> <td id="MSOZoneCell_WebPartWPQ2" valign="top" class="s4-wpcell-plain"> <!-- content --> </td> </tr> </tbody> </table>

Html 在CSS中,为什么文本对齐:-当文本对齐时webkit center对我有效:中心;不是吗? 我正在制作SharePoint 2010页,下面的代码是在页面中间成功地对表进行定心,但是当我从代码中删除-WebKIT时,它不再是中心。为什么文本不对齐:居中;工作另一件奇怪的事情是-webkit-只在Chrome中进行居中工作。在所有其他浏览器中,将此表居中似乎是不可能的 <style> .s4-wpcell-plain{ text-align: -webkit-center; } </style> <table style="width:100%" cellpadding="0" cellspacing="0"> <tbody> <tr> <td id="MSOZoneCell_WebPartWPQ2" valign="top" class="s4-wpcell-plain"> <!-- content --> </td> </tr> </tbody> </table>,html,css,webkit,Html,Css,Webkit,css属性text align:center适用于所有浏览器。而-webkit是Safari浏览器的CSS前缀,也可以与Chrome一起使用。因此,它不能与其他浏览器一起使用。结果表明,sharepoint中的Web部件不能居中。我使用了左边距和右边距:自动。它可以与center一起使用……我只是在这里创建了一个提琴来演示:@WayneAllen由于某种原因在Sharepoint 2010中不起作用。sharepoint web部件中是否有可能会覆盖我的居中尝试?我不熟悉sharepoint,但

css属性text align:center适用于所有浏览器。而-webkit是Safari浏览器的CSS前缀,也可以与Chrome一起使用。因此,它不能与其他浏览器一起使用。

结果表明,sharepoint中的Web部件不能居中。我使用了左边距和右边距:自动。

它可以与center一起使用……我只是在这里创建了一个提琴来演示:@WayneAllen由于某种原因在Sharepoint 2010中不起作用。sharepoint web部件中是否有可能会覆盖我的居中尝试?我不熟悉sharepoint,但我怀疑如果使用开发人员工具检查元素,您会发现其他类或样式正在覆盖您正在设置的CSS样式。您可以将它们居中。这就是你将它们居中的方式-自动水平边距。
<style>
.s4-wpcell-plain{
text-align: -webkit-center;
}
</style>



<table style="width:100%" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td id="MSOZoneCell_WebPartWPQ2" valign="top" class="s4-wpcell-plain">

<!-- content -->

</td>
</tr>
</tbody>
</table>