增加页面,修改样式
This commit is contained in:
@@ -29,11 +29,11 @@ namespace COMCMS.Web.Controllers
|
|||||||
if (Utils.IsInt(model.LinkURL))//如果是数字,则跳转到详情
|
if (Utils.IsInt(model.LinkURL))//如果是数字,则跳转到详情
|
||||||
{
|
{
|
||||||
//Redirect($"/aritcle/{model.LinkURL}.html");
|
//Redirect($"/aritcle/{model.LinkURL}.html");
|
||||||
Redirect($"/Article/Detail/{model.LinkURL}");
|
return Redirect($"/Article/Detail/{model.LinkURL}");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Redirect(model.LinkURL);
|
return Redirect(model.LinkURL);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -121,7 +121,7 @@ namespace COMCMS.Web.Controllers
|
|||||||
if (!string.IsNullOrEmpty(entity.LinkURL))
|
if (!string.IsNullOrEmpty(entity.LinkURL))
|
||||||
{
|
{
|
||||||
//return Content(entity.LinkURL);
|
//return Content(entity.LinkURL);
|
||||||
Redirect(entity.LinkURL);
|
return Redirect(entity.LinkURL);
|
||||||
}
|
}
|
||||||
ViewBag.kind = kind;
|
ViewBag.kind = kind;
|
||||||
ViewBag.cfg = cfg;
|
ViewBag.cfg = cfg;
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
ViewBag.keywords = Model.Keyword;
|
ViewBag.keywords = Model.Keyword;
|
||||||
ViewBag.description = Model.Description;
|
ViewBag.description = Model.Description;
|
||||||
IList<Article> alist = Article.FindAll(Article._.KId == Model.KId, Article._.Sequence.Asc(), null, 0, 0);
|
IList<Article> alist = Article.FindAll(Article._.KId == Model.KId, Article._.Sequence.Asc(), null, 0, 0);
|
||||||
|
int topkid = ViewBag.kind.PId >0? ViewBag.kind.PId : ViewBag.kind.Id;
|
||||||
|
|
||||||
}
|
}
|
||||||
<div class="banner normal sec-banner">
|
<div class="banner normal sec-banner">
|
||||||
<em style="background: url('/images/default/slide-1.jpg') center top no-repeat; background-size:cover"></em>
|
<em style="background: url('/images/default/slide-1.jpg') center top no-repeat; background-size:cover"></em>
|
||||||
@@ -40,3 +42,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<script>
|
||||||
|
$(function () {
|
||||||
|
$("#nav_@(topkid)").addClass("nav-on");
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
@model COMCMS.Core.Article
|
||||||
|
@{
|
||||||
|
ViewBag.title = Model.Title;
|
||||||
|
ViewBag.keywords = Model.Keyword;
|
||||||
|
ViewBag.description = Model.Description;
|
||||||
|
IList<Article> alist = Article.FindAll(Article._.KId == Model.KId, Article._.Sequence.Asc(), null, 0, 0);
|
||||||
|
int topkid = ViewBag.kind.PId > 0 ? ViewBag.kind.PId : ViewBag.kind.Id;
|
||||||
|
}
|
||||||
|
<div class="banner normal sec-banner">
|
||||||
|
<em style="background: url('/images/default/slide-1.jpg') center top no-repeat; background-size:cover"></em>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="sec-nav">
|
||||||
|
<div class="cont">
|
||||||
|
<ul class="sec-nav-list">
|
||||||
|
@foreach (Article a in alist)
|
||||||
|
{
|
||||||
|
<li class="@(a.Id == Model.Id?"sec-on":"")"><a asp-controller="Article" asp-action="Detail" asp-route-id="@(a.Id)" title="@a.Title">@a.Title</a></li>
|
||||||
|
}
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function mbSecNav() {
|
||||||
|
var num = $('.sec-nav-list li').length;
|
||||||
|
if (num >= 3) {
|
||||||
|
$('.sec-nav-list li').css({ 'width': (640 / 3 / 100) + 'rem' });
|
||||||
|
} else if (num == 2) {
|
||||||
|
$('.sec-nav-list li').css({ 'width': (640 / 2 / 100) + 'rem' });
|
||||||
|
} else if (num == 1) {
|
||||||
|
$('.sec-nav-list li').css({ 'width': (213 / 100) + 'rem' });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 主体内容 -->
|
||||||
|
<div class="content au">
|
||||||
|
<div class="au-bg">
|
||||||
|
<div class="cont">
|
||||||
|
@Html.Raw(Model.Content)
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
$(function () {
|
||||||
|
$("#nav_@(topkid)").addClass("nav-on");
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,108 @@
|
|||||||
|
@model COMCMS.Core.Article
|
||||||
|
@{
|
||||||
|
ViewBag.title = Model.Title;
|
||||||
|
ViewBag.keywords = Model.Keyword;
|
||||||
|
ViewBag.description = Model.Description;
|
||||||
|
IList<Article> alist = Article.FindAll(Article._.KId == Model.KId, Article._.Sequence.Asc(), null, 0, 0);
|
||||||
|
int topkid = ViewBag.kind.PId > 0 ? ViewBag.kind.PId : ViewBag.kind.Id;
|
||||||
|
|
||||||
|
}
|
||||||
|
<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.5&ak=VR85PcmdMnsofqPUCk6bD4ay"></script>
|
||||||
|
<div class="banner normal sec-banner">
|
||||||
|
<em style="background: url('/images/default/slide-1.jpg') center top no-repeat; background-size:cover"></em>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="sec-nav">
|
||||||
|
<div class="cont">
|
||||||
|
<ul class="sec-nav-list">
|
||||||
|
@foreach (Article a in alist)
|
||||||
|
{
|
||||||
|
<li class="@(a.Id == Model.Id?"sec-on":"")"><a asp-controller="Article" asp-action="Detail" asp-route-id="@(a.Id)" title="@a.Title">@a.Title</a></li>
|
||||||
|
}
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function mbSecNav() {
|
||||||
|
var num = $('.sec-nav-list li').length;
|
||||||
|
if (num >= 3) {
|
||||||
|
$('.sec-nav-list li').css({ 'width': (640 / 3 / 100) + 'rem' });
|
||||||
|
} else if (num == 2) {
|
||||||
|
$('.sec-nav-list li').css({ 'width': (640 / 2 / 100) + 'rem' });
|
||||||
|
} else if (num == 1) {
|
||||||
|
$('.sec-nav-list li').css({ 'width': (213 / 100) + 'rem' });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 主体内容 -->
|
||||||
|
<div class="content cu au">
|
||||||
|
<div class="cu-bg">
|
||||||
|
<div class="cont">
|
||||||
|
<div class="cu-box">
|
||||||
|
<!-- 地图 -->
|
||||||
|
<div class="cu-left">
|
||||||
|
<div class="maptxt" style="display:none">广东省广州市天河区天河城</div>
|
||||||
|
<div id="map"></div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
// 获取地址
|
||||||
|
function map() {
|
||||||
|
var index;
|
||||||
|
var address = $(".maptxt").text();
|
||||||
|
var title = $(".maptxt").text();
|
||||||
|
showMap(address, title);
|
||||||
|
}
|
||||||
|
// 显示地图
|
||||||
|
function showMap(address, title) {
|
||||||
|
var map = new BMap.Map("map");
|
||||||
|
map.enableScrollWheelZoom(); //启用滚轮放大缩小,默认禁用
|
||||||
|
map.enableContinuousZoom(); //启用地图惯性拖拽,默认禁用
|
||||||
|
map.addControl(new BMap.NavigationControl()); //添加默认缩放平移控件
|
||||||
|
map.addControl(new BMap.OverviewMapControl({ isOpen: false, anchor: BMAP_ANCHOR_BOTTOM_RIGHT })); //右下角,打开, 控制地图的移动
|
||||||
|
map.clearOverlays(); //清空原来的标注
|
||||||
|
|
||||||
|
// 根据地址获取经纬度
|
||||||
|
var localSearch = new BMap.LocalSearch(map);
|
||||||
|
searchByStationName();
|
||||||
|
function searchByStationName() {
|
||||||
|
// 显示地图
|
||||||
|
localSearch.setSearchCompleteCallback(function (searchResult) {
|
||||||
|
var poi = searchResult.getPoi(0);
|
||||||
|
console.log(searchResult.getPoi(0));
|
||||||
|
var marker = new BMap.Marker(new BMap.Point(poi.point.lng, poi.point.lat)); // 创建标注,为要查询的地方对应的经纬度
|
||||||
|
map.centerAndZoom(poi.point, 15);
|
||||||
|
map.addOverlay(marker); //将标注添加到地图中
|
||||||
|
marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
|
||||||
|
});
|
||||||
|
localSearch.search(address);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
<!-- 公司信息 -->
|
||||||
|
<div class="cu-right">
|
||||||
|
<div class="cu-title">
|
||||||
|
<span>COMCMS 内容管理系统</span>
|
||||||
|
<small>COMCMS Technology Co.,Ltd</small>
|
||||||
|
</div>
|
||||||
|
<div class="cu-info">
|
||||||
|
<ul>
|
||||||
|
<li>电话:+86-20-88888888</li>
|
||||||
|
<li>传真:+86-20-88888888</li>
|
||||||
|
<li>邮箱:<a href="hogenwang@vip.qq.com">hogenwang@vip.qq.com</a></li>
|
||||||
|
<li>地址:广东省广州市天河区天河城</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(function () {
|
||||||
|
$("#nav_@(topkid)").addClass("nav-on");
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@@ -5,71 +5,70 @@
|
|||||||
ViewBag.description = Model.Description;
|
ViewBag.description = Model.Description;
|
||||||
//获取同级分类
|
//获取同级分类
|
||||||
IList<ArticleCategory> sameList = ArticleCategory.FindAll(ArticleCategory._.PId == Model.PId, ArticleCategory._.Rank.Asc(), null, 0, 0);
|
IList<ArticleCategory> sameList = ArticleCategory.FindAll(ArticleCategory._.PId == Model.PId, ArticleCategory._.Rank.Asc(), null, 0, 0);
|
||||||
|
int topkid = Model.PId > 0 ? Model.PId : Model.Id;
|
||||||
}
|
}
|
||||||
<div class="banner mobile sec-banner">
|
|
||||||
|
<div class="banner normal sec-banner">
|
||||||
<em style="background: url('/images/default/slide-1.jpg') center top no-repeat; background-size: 100%;"></em>
|
<em style="background: url('/images/default/slide-1.jpg') center top no-repeat; background-size: 100%;"></em>
|
||||||
</div>
|
</div>
|
||||||
<div class="sec-nav">
|
@if (Model.PId > 0)
|
||||||
<div class="cont">
|
{
|
||||||
<ul class="sec-nav-list">
|
<div class="sec-nav">
|
||||||
@foreach (var k in sameList)
|
<div class="cont">
|
||||||
{
|
<ul class="sec-nav-list">
|
||||||
<li class="@(k.Id == Model.Id?"sec-on":"")"><a asp-controller="Article" asp-action="Index" asp-route-id="@(k.Id)" title="@k.KindName">@k.KindName</a></li>
|
@foreach (var k in sameList)
|
||||||
}
|
{
|
||||||
</ul>
|
<li class="@(k.Id == Model.Id?"sec-on":"")"><a asp-controller="Article" asp-action="Index" asp-route-id="@(k.Id)" title="@k.KindName">@k.KindName</a></li>
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
function mbSecNav() {
|
|
||||||
var num = $('.sec-nav-list li').length;
|
|
||||||
if (num >= 3) {
|
|
||||||
$('.sec-nav-list li').css({ 'width': (640 / 3 / 100) + 'rem' });
|
|
||||||
} else if (num == 2) {
|
|
||||||
$('.sec-nav-list li').css({ 'width': (640 / 2 / 100) + 'rem' });
|
|
||||||
} else if (num == 1) {
|
|
||||||
$('.sec-nav-list li').css({ 'width': (213 / 100) + 'rem' });
|
|
||||||
}
|
}
|
||||||
}
|
</ul>
|
||||||
</script>
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function mbSecNav() {
|
||||||
|
var num = $('.sec-nav-list li').length;
|
||||||
|
if (num >= 3) {
|
||||||
|
$('.sec-nav-list li').css({ 'width': (640 / 3 / 100) + 'rem' });
|
||||||
|
} else if (num == 2) {
|
||||||
|
$('.sec-nav-list li').css({ 'width': (640 / 2 / 100) + 'rem' });
|
||||||
|
} else if (num == 1) {
|
||||||
|
$('.sec-nav-list li').css({ 'width': (213 / 100) + 'rem' });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
}
|
||||||
|
|
||||||
<div class="content newsC">
|
<div class="content newsC">
|
||||||
<div class="news-bg">
|
<div class="news-bg">
|
||||||
<div class="cont">
|
<div class="cont">
|
||||||
<ul class="news-list" id="listComment">
|
<ul class="news-list" id="listComment">
|
||||||
<li>
|
@foreach (Article a in ViewBag.list)
|
||||||
<a href="/article.aspx?id=36" title="精准和立体定向放射治疗新技术研讨会">
|
{
|
||||||
<div class="news-pic">
|
<li>
|
||||||
<div class="pic-box">
|
<a asp-controller="Article" asp-action="Detail" asp-route-id="@(a.Id)" title="@a.Title">
|
||||||
<img src="/userfiles/images/new/150.jpg" alt="精准和立体定向放射治疗新技术研讨会">
|
@if (!string.IsNullOrEmpty(a.Pic))
|
||||||
|
{
|
||||||
|
<div class="news-pic">
|
||||||
|
<div class="pic-box">
|
||||||
|
|
||||||
|
<img src="/userfiles/images/new/150.jpg" alt="@a.Title">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
<div class="news-text">
|
||||||
|
<span>@a.Title</span>
|
||||||
|
<p>@Utils.CutString(Utils.NoHTML(a.Content), 200)</p>
|
||||||
|
<small>@a.AddTime.ToString("yyyy-MM-dd HH:mm")</small>
|
||||||
|
<b class="normal">查看详情</b>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</a>
|
||||||
<div class="news-text">
|
</li>
|
||||||
<span>精准和立体定向放射治疗新技术研讨会</span>
|
}
|
||||||
<p>由广东省生物医学工程学会物理分会、中山大学附属肿瘤医院,安科锐医疗设备(上海)有限公司与广州市泰佳电子科技有限公司联合主办的“精准和立体定向放射治疗新技术研讨会”于2016年12月10日在广州南沙大酒店举行。...</p>
|
@if (ViewBag.list == null || ViewBag.list.Count < 1)
|
||||||
<small>2017-05-18</small>
|
{
|
||||||
<b class="normal">查看详情</b>
|
<li>暂无相关记录...</li>
|
||||||
</div>
|
}
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="/article.aspx?id=35" title="主办的“广东省粤东地区二〇一六年医科达放疗高端新技术研讨会”">
|
|
||||||
<div class="news-pic">
|
|
||||||
<div class="pic-box">
|
|
||||||
<img src="/userfiles/images/new/14815565132135.jpg" alt="主办的“广东省粤东地区二〇一六年医科达放疗高端新技术研讨会”">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="news-text">
|
|
||||||
<span>主办的“广东省粤东地区二〇一六年医科达放疗高端新技术研讨会”</span>
|
|
||||||
<p>
|
|
||||||
由医科达医疗器械有限公司与广州市泰佳电子科技有限公司联合主办的“广东省粤东地区二〇一六年医科达放疗高端新技术研讨会”已于2016年1月16日在汕头龙光喜来登酒店举行。
|
|
||||||
本次研讨会邀请了广东省放射肿瘤学会及省内...
|
|
||||||
</p>
|
|
||||||
<small>2016-12-12</small>
|
|
||||||
<b class="normal">查看详情</b>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
<!-- 分页按钮 -->
|
<!-- 分页按钮 -->
|
||||||
<div class="normal">
|
<div class="normal">
|
||||||
@@ -80,3 +79,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(function () {
|
||||||
|
$("#nav_@(topkid)").addClass("nav-on");
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@@ -673,7 +673,7 @@
|
|||||||
prevButton: '.banner-prev',
|
prevButton: '.banner-prev',
|
||||||
autoplay: 3000,
|
autoplay: 3000,
|
||||||
})
|
})
|
||||||
|
$("#nav_0").addClass("nav-on");
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -28,13 +28,13 @@
|
|||||||
<div class="menu-box">
|
<div class="menu-box">
|
||||||
<div class="menu-bg"></div>
|
<div class="menu-bg"></div>
|
||||||
<ul class="nav-list">
|
<ul class="nav-list">
|
||||||
<li id="nav_1"><a href="/" title="首页">首页</a><i></i></li>
|
<li id="nav_0"><a href="/" title="首页">首页</a><i></i></li>
|
||||||
<li id="nav_2"><a asp-controller="Article" asp-action="Index" asp-route-id="1" title="关于我们">关于我们</a><i></i></li>
|
<li id="nav_1"><a asp-controller="Article" asp-action="Index" asp-route-id="1" title="关于我们">关于我们</a><i></i></li>
|
||||||
<li id="nav_3"><a asp-controller="Product" asp-action="Index" asp-route-id="1" title="产品中心">产品中心</a><i></i></li>
|
<li id="nav_P"><a asp-controller="Product" asp-action="Index" asp-route-id="1" title="产品中心">产品中心</a><i></i></li>
|
||||||
<li id="nav_4"><a asp-controller="Article" asp-action="Index" asp-route-id="2" title="新闻资讯">新闻资讯</a><i></i></li>
|
<li id="nav_2"><a asp-controller="Article" asp-action="Index" asp-route-id="2" title="新闻资讯">新闻资讯</a><i></i></li>
|
||||||
<li id="nav_5"><a asp-controller="Article" asp-action="Index" asp-route-id="3" title="项目案例">项目案例</a><i></i></li>
|
<li id="nav_3"><a asp-controller="Article" asp-action="Index" asp-route-id="3" title="项目案例">项目案例</a><i></i></li>
|
||||||
<li id="nav_6"><a asp-controller="Article" asp-action="Index" asp-route-id="4" title="用户服务">用户服务</a><i></i></li>
|
<li id="nav_4"><a asp-controller="Article" asp-action="Index" asp-route-id="4" title="用户服务">用户服务</a><i></i></li>
|
||||||
<li id="nav_7"><a asp-controller="Article" asp-action="Index" asp-route-id="5" title="联系我们">联系我们</a><i></i></li>
|
<li id="nav_5"><a asp-controller="Article" asp-action="Index" asp-route-id="5" title="联系我们">联系我们</a><i></i></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -215,7 +215,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$("#nav_1").addClass("nav-on");
|
|
||||||
init();
|
init();
|
||||||
$(window).resize(function () {
|
$(window).resize(function () {
|
||||||
init();
|
init();
|
||||||
@@ -223,8 +222,8 @@
|
|||||||
if (!IsPC()) {
|
if (!IsPC()) {
|
||||||
cds();
|
cds();
|
||||||
}
|
}
|
||||||
proShow();
|
//proShow();
|
||||||
coopSwiper();
|
//coopSwiper();
|
||||||
var mySwiper = new Swiper('.banner .swiper-container', {
|
var mySwiper = new Swiper('.banner .swiper-container', {
|
||||||
loop: true,
|
loop: true,
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,102 @@
|
|||||||
function Init () {
|
function init() {
|
||||||
if (!(/msie [6|7|8|9]/i.test(navigator.userAgent))) {
|
if (!IsPC()) {
|
||||||
var wow = new WOW({
|
window_w = $(window).width();
|
||||||
boxClass: 'wow',
|
console.log(window.innerWidth);
|
||||||
animateClass: 'animated',
|
if (window_w >= 768) {
|
||||||
offset: 0,
|
$('#main').addClass('pc').removeClass('mb');
|
||||||
mobile: true,
|
resize(0, 1200, window_w);
|
||||||
live: true
|
} else {
|
||||||
});
|
$('#main').addClass('mb').removeClass('pc');
|
||||||
wow.init()
|
resize(0, 640, window_w);
|
||||||
}
|
}
|
||||||
|
console.log('false: ' + IsPC());
|
||||||
backTop();
|
console.log('false: ' + window_w);
|
||||||
|
JPlaceHolder.init();
|
||||||
|
} else {
|
||||||
|
window_w = window.screen.width;
|
||||||
|
console.log('true: ' + window_w);
|
||||||
|
$('#main').addClass('mb').removeClass('pc');
|
||||||
|
resize(0, 640, window_w);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
function IsPC() {
|
||||||
|
isPC = true;
|
||||||
|
if ((navigator.userAgent.match(/(iPhone|iPod|Android|ios|iPad|Touch|PlayBook|SymbianOS|Windows Phone|Nokia)/))) {
|
||||||
|
isPC = true;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
isPC = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return isPC;
|
||||||
|
}
|
||||||
|
// 鑷€傚簲灞忓箷澶у皬
|
||||||
|
function resize(min_w, max_w, window_w) {
|
||||||
|
// var font_size = Math.round((window_w/max_w*6.25)*10000)/100;
|
||||||
|
font_size = Math.round((window_w / max_w * 6.25) * 10000) / 100;
|
||||||
|
|
||||||
|
if (window_w >= min_w && window_w <= max_w) {
|
||||||
|
$('html').css({ 'font-size': font_size + "%" });
|
||||||
|
} else if (window_w > max_w) {
|
||||||
|
$('html').css({ 'font-size': "625%" });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var JPlaceHolder = {
|
||||||
|
|
||||||
|
_check: function () {
|
||||||
|
return 'placeholder' in document.createElement('input');
|
||||||
|
},
|
||||||
|
|
||||||
|
init: function () {
|
||||||
|
if (!this._check()) {
|
||||||
|
this.fix();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
fix: function () {
|
||||||
|
jQuery(':input[placeholder]').each(function (index, element) {
|
||||||
|
var self = $(this), txt = self.attr('placeholder');
|
||||||
|
self.wrap($('<div></div>').css({ position: 'relative', zoom: '1', border: 'none', background: 'none', padding: 'none', margin: 'none' }));
|
||||||
|
var pos = self.position(), h = self.outerHeight(true), paddingleft = self.css('padding-left');
|
||||||
|
var holder = $('<span></span>').text(txt).css({ position: 'absolute', left: pos.left, top: pos.top, height: h, lienHeight: h, paddingLeft: paddingleft, color: '#aaa' }).appendTo(self.parent());
|
||||||
|
self.focusin(function (e) {
|
||||||
|
holder.hide();
|
||||||
|
}).focusout(function (e) {
|
||||||
|
if (!self.val()) {
|
||||||
|
holder.show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
holder.click(function (e) {
|
||||||
|
holder.hide();
|
||||||
|
self.focus();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
function cds() {
|
||||||
|
var deg = 0;
|
||||||
|
var int;
|
||||||
|
var hover = 0;
|
||||||
|
$('.cds-list li').on('mouseover', function () {
|
||||||
|
console.log(1);
|
||||||
|
if (hover === 0) {
|
||||||
|
var that = $(this);
|
||||||
|
int = setInterval(function () {
|
||||||
|
deg += 10;
|
||||||
|
that.find('b')[0].style.transform = 'rotate(' + deg + 'deg)';
|
||||||
|
}, 50);
|
||||||
|
hover = 1;
|
||||||
|
}
|
||||||
|
}).on('mouseleave', function () {
|
||||||
|
if (hover == 1) {
|
||||||
|
clearInterval(int);
|
||||||
|
deg = 0;
|
||||||
|
$(this).find('b')[0].style.transform = 'rotate(0deg)';
|
||||||
|
hover = 0;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 导航栏
|
// 导航栏
|
||||||
function navHover () {
|
function navHover () {
|
||||||
|
|||||||
Reference in New Issue
Block a user