跳转到主要内容
你行网

Main navigation

  • 首页
  • Drupal
  • 编程与开发
  • 数据库
  • 操作系统与应用
  • 服务器与运维
  • 社区
User account menu
  • 登录

面包屑

  1. 首页

CSS 基础教程-011 CSS 用百分比来定位背景图像

由 hrs, 23 十二月, 2019

实例代码:

<!doctype html>
<head>
<meta charset="utf-8">
<style type="text/css">
body{
background-image:url(img/beijing.jpeg);
background-attachment:fixed;
background-repeat:no-repeat;
background-position:30% 20%;
}

</style>
</head>
<html>
<body>
<p>这是一个用百分比来定位背景图像的实例</p>
<p>我们用30% 20% 来定位图像的位置。</p>
<body>
</html>

运行效果:

css_011.png

图像会中页面中按百分比的位置来显示。

  • 登录或注册以发表评论
内容类型分类
技术文章
文章归类
编程与开发

文章标签

  • CSS

评论

文章标签

Excel
CSS
ubuntu
php
vim
五笔
VPN
Linux
command
HTML
drupal 8
drupal 7
centos
composer
Mysql
模块(module)
drush
Drupal
JavaSrcipt
apache
英语
drupal 9
nerdtree
荔壳风
network
果树种植
surround
drupal10
SEO
主题(theme)
更多

相关文章

  • 因权限问题导致drupal cms 无法正常安装,那么该如何解决这个问题
  • kvm虚拟机启动失败:default网络未激活
  • ubuntu 安装kvm 虚拟机
  • foreach 是 PHP 循环语句使用方法
  • implode() 函数的定义和用法
  • Drupal 11 主题制作教程
  • 检查 Composer 是否为官方源
  • 在 Drupal 中权重(Weight)是怎样排序的
  • 解决 Drupal 主题缺失问题
  • 为什么学习php 会一边学,一边忘
RSS源

友情链接 网站地图 版权信息 联系我们 网址导航 社区

Copyright © 2019 - 2021 你行网 版权所有  粤ICP备19072650号