Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
КР_Носова_ПЗ_2013.doc
Скачиваний:
0
Добавлен:
01.05.2025
Размер:
6 Мб
Скачать
☆

2.1 Разработка внутренней структуры

В таблице 1 представлена детализация таблицы стилей.

Таблица 1

Свойства объектов

Наименование

Свойства объекта

<div>

id="opaco" class="hidden"

<table>

border="0"

cellpadding="0"

cellspacing="0"

<td>

bgcolor="#620556"

<a>

href="index.htm"

Продолжение таблицы 1

<img>

src="index_files/logo.jpg"

alt=""

border="0"

height="212"

width="212"

<ul>

class="innerfade"

style="position: relative; height: 188px;"

id="main-img-img"

<li>

style="z-index: 3;

position: absolute;

display: none;"

body

{ margin: 0px;

padding: 0px;

font-family: Tahoma;

font-size: 15px;

color: #333333;

text-decoration: none;

background:#d8c9bf; }

<span>

id='phone'

#logoblock table tr td ul .active-menu

{ border-bottom-width: 1px;

border-bottom-style: dotted;

border-bottom-color: #620556;

color: #620556;

}

#logoblock table tr td ul .active-menu a

{

color: #620556;

}

#logoblock table tr td ul li a

{

padding-left: 25px;

color: #333333;

text-decoration: none;

}

#logoblock table tr td ul li a:hover

{

color: #620556;

text-decoration: none;

}

#fotoframe

{

margin: 0px;

padding: 0px;

width: 100%;

overflow: hidden;

}

Продолжение таблицы 1

h1

{

font-family: Tahoma;

font-size: 18px;

color: #620556;

text-decoration: none;

font-weight: normal;

text-transform: uppercase;

}

Функция увеличения изображения:

(function ($) {

$(document).ready(function () {

$('.cloud-zoom, .cloud-zoom-gallery').CloudZoom();

});

function format(str) {

for (var i = 1; i < arguments.length; i++) {

str = str.replace('%' + (i - 1), arguments[i]);

}

return str;

}

function CloudZoom(jWin, opts) {

var sImg = $('img', jWin);

var img1;

var img2;

var zoomDiv = null;

var $mouseTrap = null;

var lens = null;

var $tint = null;

var softFocus = null;

var $ie6Fix = null;

var zoomImage;

var controlTimer = 0;

var cw, ch;

var destU = 0;

var destV = 0;

var currV = 0;

var currU = 0;

var filesLoaded = 0;

var mx,

my;

var ctx = this, zw;

setTimeout(function () {

<img src="/images/loading.gif"/>

if ($mouseTrap === null) {

var w = jWin.width();

jWin.parent().append(format('<div style="width:%0px;position:absolute;top:75%;left:%1px;text-align:center" class="cloud-zoom-loading" >Loading...</div>', w / 3, (w / 2) - (w / 6))).find(':last').css('opacity', 0.5);

}

}, 200);

var ie6FixRemove = function () {

if ($ie6Fix !== null) {

$ie6Fix.remove();

$ie6Fix = null;

}

};

this.removeBits = function () {

//$mouseTrap.unbind();

if (lens) { lens.remove();

lens = null;

}

if ($tint) {

$tint.remove();

$tint = null;

}

if (softFocus) {

softFocus.remove();

softFocus = null;

}

ie6FixRemove();

$('.cloud-zoom-loading', jWin.parent()).remove();

};

this.destroy = function () {

jWin.data('zoom', null);

if ($mouseTrap) {

$mouseTrap.unbind();

$mouseTrap.remove();

$mouseTrap = null;

}

if (zoomDiv) {

zoomDiv.remove();

zoomDiv = null;

}

this.removeBits();

};