头闻号

宜兴市华生化工有限公司

一元醇|酯|酮|香精和香料中间体|二元醇|三元醇

首页 > 新闻中心 > 科技常识:css实现背景渐变与底部固定的蓝天白云示例
科技常识:css实现背景渐变与底部固定的蓝天白云示例
发布时间:2023-02-01 09:50:08        浏览次数:5        返回列表

今天小编跟大家讲解下有关css实现背景渐变与底部固定的蓝天白云示例 ,相信小伙伴们对这个话题应该有所关注吧,小编也收集到了有关css实现背景渐变与底部固定的蓝天白云示例 的相关资料,希望小伙伴们看了有所帮助。

复制代码代码如下: <?php defined('_JEXEC') or die; JHtml::_('behavior.framework', true); //if(!$templateparams->get('html5', 0)): ?> <!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"xml:lang="<?php echo $this->language; ?>"lang="<?php echo $this->language; ?>"dir="<?php echo $this->direction; ?>"> <head> <!--jdoc:include type="head"/--> <style type="text/css"> html { height: 100%; } body { <!-- background:url(http://127.0.0.1/joomla25/templates/usegear/images/bg.png); background-size:100% 800%; background-repeat:no-repeat; padding-bottom:80px; --> height: 100%; background-attachment: fixed; margin:0; padding:0; background-repeat: no-repeat; background: rgb(30,87,153); background: -moz-linear-gradient(top, rgba(30,87,153,1) 0%, rgba(125,185,232,1) 90%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(30,87,153,1)), color-stop(90%,rgba(125,185,232,1))); background: -webkit-linear-gradient(top, rgba(30,87,153,1) 0%,rgba(125,185,232,1) 90%); background: -o-linear-gradient(top, rgba(30,87,153,1) 0%,rgba(125,185,232,1) 90%); background: -ms-linear-gradient(top, rgba(30,87,153,1) 0%,rgba(125,185,232,1) 90%); background: linear-gradient(to bottom, rgba(30,87,153,1) 0%,rgba(125,185,232,1) 90%); } #body_foot { position:absolute; bottom:0px; right:0px; background:url(http://127.0.0.1/LXX/pictures/cloud.png); background-size:30% 180%; -moz-background-size:63px 130px; background-repeat:repeat; padding-bottom:1%; margin:0; } #body_foot1 { position:absolute; bottom:0px; right:0px; background:url(http://127.0.0.1/LXX/pictures/cloud2.png); background-size:40% 180%; -moz-background-size:63px 130px; background-repeat:repeat; padding-bottom:1%; margin:0; } </style> </head> <body> <div> <p></p> <p>rtyeryteryteryteryt</p> <p>rtyeryt</p> <p>ertyerytre</p> <p>ertyerytre</p> <p>ertyerytre</p> <p>ertyerytre</p> <p>ertyerytre</p> <p>ertyerytre</p> </div> <div id="body_foot1"style="position:absolute;bottom:1px;height:20%; width:100%;"> <div id="body_foot"style="position:absolute;bottom:1px;height:100%; width:100%;"> </div> </div> </div> </div> </body> </html> 其中主要有: 1、渐变背景的的设定:body{} 2、动态在低端的白云:设定了body_foot1和body_foot1中的循环图片显示定义 以及div动态底端的设定。以及嵌套div掩盖白云图片规律性显示。

来源:爱蒂网