css如何将一排文字倾斜45°,请高手指点

html-css023

css如何将一排文字倾斜45°,请高手指点,第1张

1、打开html开发软件工具,新建一个html代码页面,创建一个<div>,同时给这个<div>添加一些文本内容和一个class类为 oblique。

2、使用font-style: oblique设置字体倾斜。创建<style>标签,然后在这个标签里面设置oblique类font-style属性为oblique。

代码:

<style>

.oblique{

font-style: oblique

}

</style>

3、最后,可以用链接打开可以看到已经倾斜45度,就是上面的代码编写即可。

css实现斜角原理:

把border进行旋转:

border: 2px solid #FFF

-webkit-transform: rotate(204deg)

预览效果页面:

http://each.sinaapp.com/game/index.html