css3的一些新属性1

本文介绍了CSS3中的文本阴影效果设置、文本强制换行属性word-wrap:break-word的应用以及2D转换的基本用法。通过实例展示了如何实现这些效果,并提供了代码示例。
<body>
/*文本阴影*/
<h1 style="text-shaow:5px 5px 5px #C0F">我爱你</h1>

</body>

 1. 效果如图:

   2.word-wrap: break-word允许文本强制换行

<head>
<style> 
p.test
{
width:11em; 
border:1px solid #000000;
word-wrap:break-word;
}
</style>
</head>
<body>

<p class="test">This paragraph contains a very long word: thisisaveryveryveryveryveryverylongword. The long word will break and wrap to the next line.</p>

</body>
</html>

   如图所示:

 3.css3的2D转换

 

<style>

#kuang{
    height:50px;
    width:100px;
    border:1px solid red;
    background-color:#C3F;}/*正常的div*/
#kuang11{
    height:50px;
    width:100px;
    border:1px solid red;
    background-color:#6F0;
    margin-top:50px;
    transform:rotate(30deg)/*旋转后的div*/
    }
</style>
<body>
<div id="kuang"></div>
<div id="kuang11"></div>
</body>

如图所示:

转载于:https://www.cnblogs.com/xiaodouding/p/6144953.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值