search
Homephp教程php手册应用开发中涉及到的css和php笔记分享

应用开发中涉及到的css和php笔记分享

Jun 13, 2016 pm 12:06 PM
cssphpDoaboutshareMethodandapplicationapplication developmentofnotessolveRecordmeetquestion

关于应用中遇到的一些问题及解决办法,做一些记录,以备后用。本人新手,技术还不熟练,笔记比较幼稚。嘲笑请轻笑。
  1、关于层的绝对定位。
  有两个div层,其中main类div是整体的层,cloud类div是绝对定位层,实现的效果是在屏幕右上角显示一个云彩的gif图片。div布局代码如下:

复制代码 代码如下:




...


在过程中一度将cloud层放在了main层里,导致ie无法显示cloud层。后将cloud层放出main层外部,并将main的position改为relative,才解决了这个问题。CSS代码如下:

复制代码 代码如下:


.main{
position:relative;
top:30px;
width:600px;
height:auto;
text-align:left;
background-color:#FFFFFF;
border:5px solid #FF0011;
}
.cloud {
background: url(../image/cloud.gif) no-repeat 100% 50%;
height: 171px;
position: absolute;
right: 0px;
top: 0px;
width: 345px;
z-index: 1000;
}


  2、关于年月日的下拉框选择实现。
年月日的下拉框做的很呆滞,日期不能随着年份和月份的变化而变化。但是这是比较初级的解决方案,也参考了网上别人的方法。以后再研究更新的方法。

复制代码 代码如下:


$months = array (1 => '1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月');
$days = range(1,31);
$years = range(1930,2011);
echo '';
echo '';
echo '';
?>


3、待续。
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.