Commit d80c863c authored by 郭朴讴's avatar 郭朴讴

半导体样式

parent fe2b4ce1
...@@ -215,7 +215,20 @@ ...@@ -215,7 +215,20 @@
@section footer{ @section footer{
<script> <script>
function IsPC() {
let source = true;
if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) {
source = false
} else {
source =true
}
return source
}
$(function () { $(function () {
if (IsPC()) {
$("#tab3 .top .intro").wrap("<div style='height: 360px;overflow: hidden;'></div>");
$("#tab3 .row .text p").wrap("<div style='height: 175px;overflow: hidden;'></div>");
}
var url = $(location).attr('href'); var url = $(location).attr('href');
var oindex = url.indexOf("#"); var oindex = url.indexOf("#");
if (oindex > 0) { if (oindex > 0) {
...@@ -244,42 +257,43 @@ ...@@ -244,42 +257,43 @@
$(this).addClass("active"); $(this).addClass("active");
var con = $(this).attr("href"); var con = $(this).attr("href");
$(con).addClass("active").siblings().removeClass("active"); $(con).addClass("active").siblings().removeClass("active");
$("#tab3 .row").addClass("disflex"); if (IsPC()) {
$("#tab3 .top .intro").wrap("<div style='height: 360px;overflow: hidden;'></div>");
$("#tab3 .row .text p").wrap("<div style='height: 175px;overflow: hidden;'></div>"); $("#tab3 .row").addClass("disflex");
if ($("#tab3 .top .intro").height()>360) { if ($("#tab3 .top .intro").height()>360) {
$("#tab3 .top .intro").parent().parent().parent().append("<div style='color: #FFFFFF;' class='zkbtn'>open</div>"); $("#tab3 .top .intro").parent().parent().parent().append("<div style='color: #FFFFFF;' class='zkbtn'>open</div>");
} }
$("#tab3 .row .text p").each(function(){ $("#tab3 .row .text p").each(function(){
if ($(this).height()>175) { if ($(this).height()>175) {
$(this).parent().parent().append("<div class='zkbtn1'>open</div>"); $(this).parent().parent().append("<div class='zkbtn1'>open</div>");
} }
}) })
$(".zkbtn").click(function(event){ $(".zkbtn").click(function(event){
event.stopPropagation(); event.stopPropagation();
event.preventDefault(); event.preventDefault();
$(this).parent().find(".intro").parent().toggleClass("tdiv"); $(this).parent().find(".intro").parent().toggleClass("tdiv");
$(this).parent().toggleClass("tdivs"); $(this).parent().toggleClass("tdivs");
if ($(this).parent().find(".intro").parent().hasClass("tdiv")) { if ($(this).parent().find(".intro").parent().hasClass("tdiv")) {
$(this).html("close") $(this).html("close")
}else{ }else{
$(this).html("open") $(this).html("open")
} }
}) })
$(".zkbtn1").click(function(event){ $(".zkbtn1").click(function(event){
event.stopPropagation(); event.stopPropagation();
event.preventDefault(); event.preventDefault();
$(this).parent().find("p").parent().toggleClass("tdiv"); $(this).parent().find("p").parent().toggleClass("tdiv");
$(this).parent().parent().toggleClass("tdiv"); $(this).parent().parent().toggleClass("tdiv");
if ($(this).parent().find("p").parent().hasClass("tdiv")) { if ($(this).parent().find("p").parent().hasClass("tdiv")) {
$(this).html("close") $(this).html("close")
}else{ }else{
$(this).html("open") $(this).html("open")
} }
}) })
}
}) })
}); });
......
...@@ -39,7 +39,20 @@ ...@@ -39,7 +39,20 @@
@section footer{ @section footer{
<script> <script>
function IsPC() {
let source = true;
if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) {
source = false
} else {
source =true
}
return source
}
$(function () { $(function () {
if (IsPC()) {
$("#tab3 .top .intro").wrap("<div style='height: 360px;overflow: hidden;'></div>");
$("#tab3 .row .text p").wrap("<div style='height: 175px;overflow: hidden;'></div>");
}
var url = $(location).attr('href'); var url = $(location).attr('href');
var oindex = url.indexOf("#"); var oindex = url.indexOf("#");
if (oindex > 0) { if (oindex > 0) {
...@@ -68,42 +81,43 @@ ...@@ -68,42 +81,43 @@
$(this).addClass("active"); $(this).addClass("active");
var con = $(this).attr("href"); var con = $(this).attr("href");
$(con).addClass("active").siblings().removeClass("active"); $(con).addClass("active").siblings().removeClass("active");
$("#tab3 .row").addClass("disflex"); if (IsPC()) {
$("#tab3 .top .intro").wrap("<div style='height: 360px;overflow: hidden;'></div>");
$("#tab3 .row .text p").wrap("<div style='height: 175px;overflow: hidden;'></div>"); $("#tab3 .row").addClass("disflex");
if ($("#tab3 .top .intro").height()>360) { if ($("#tab3 .top .intro").height()>360) {
$("#tab3 .top .intro").parent().parent().parent().append("<div style='color: #FFFFFF;' class='zkbtn'>open</div>"); $("#tab3 .top .intro").parent().parent().parent().append("<div style='color: #FFFFFF;' class='zkbtn'>open</div>");
} }
$("#tab3 .row .text p").each(function(){ $("#tab3 .row .text p").each(function(){
if ($(this).height()>175) { if ($(this).height()>175) {
$(this).parent().parent().append("<div class='zkbtn1'>open</div>"); $(this).parent().parent().append("<div class='zkbtn1'>open</div>");
} }
}) })
$(".zkbtn").click(function(event){ $(".zkbtn").click(function(event){
event.stopPropagation(); event.stopPropagation();
event.preventDefault(); event.preventDefault();
$(this).parent().find(".intro").parent().toggleClass("tdiv"); $(this).parent().find(".intro").parent().toggleClass("tdiv");
$(this).parent().toggleClass("tdivs"); $(this).parent().toggleClass("tdivs");
if ($(this).parent().find(".intro").parent().hasClass("tdiv")) { if ($(this).parent().find(".intro").parent().hasClass("tdiv")) {
$(this).html("close") $(this).html("close")
}else{ }else{
$(this).html("open") $(this).html("open")
} }
}) })
$(".zkbtn1").click(function(event){ $(".zkbtn1").click(function(event){
event.stopPropagation(); event.stopPropagation();
event.preventDefault(); event.preventDefault();
$(this).parent().find("p").parent().toggleClass("tdiv"); $(this).parent().find("p").parent().toggleClass("tdiv");
$(this).parent().parent().toggleClass("tdiv"); $(this).parent().parent().toggleClass("tdiv");
if ($(this).parent().find("p").parent().hasClass("tdiv")) { if ($(this).parent().find("p").parent().hasClass("tdiv")) {
$(this).html("close") $(this).html("close")
}else{ }else{
$(this).html("open") $(this).html("open")
} }
}) })
}
}) })
}); });
......
...@@ -85,11 +85,21 @@ ...@@ -85,11 +85,21 @@
@section footer{ @section footer{
<script> <script>
function IsPC() {
let source = true;
if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) {
source = false
} else {
source =true
}
return source
}
$(function () { $(function () {
if (IsPC()) {
$("#tab2 .txt p").wrap("<div style='height: 100px;overflow: hidden;'></div>");
$("#tab2 .txt p").wrap("<div style='height: 100px;overflow: hidden;'></div>"); $("#tab3 p").wrap("<div style='height: 50px;overflow: hidden;'></div>");
}
$("#tab3 p").wrap("<div style='height: 50px;overflow: hidden;'></div>");
var url = $(location).attr('href'); var url = $(location).attr('href');
...@@ -120,30 +130,32 @@ ...@@ -120,30 +130,32 @@
$(this).addClass("active"); $(this).addClass("active");
var con = $(this).attr("href"); var con = $(this).attr("href");
$(con).addClass("active").siblings().removeClass("active"); $(con).addClass("active").siblings().removeClass("active");
$("#tab2 .row").addClass("disflex"); if (IsPC()) {
$("#tab3 .row").addClass("disflex"); $("#tab2 .row").addClass("disflex");
$("#tab2 .txt p").each(function(){ $("#tab3 .row").addClass("disflex");
console.log($(this).height()); $("#tab2 .txt p").each(function(){
if ($(this).height()>100) { console.log($(this).height());
$(this).parent().parent().append("<div class='zkbtn'>open</div>"); if ($(this).height()>100) {
} $(this).parent().parent().append("<div class='zkbtn'>open</div>");
}) }
$("#tab3 p").each(function(){ })
console.log($(this).height()); $("#tab3 p").each(function(){
if ($(this).height()>50) { console.log($(this).height());
$(this).parent().parent().append("<div class='zkbtn'>open</div>"); if ($(this).height()>50) {
} $(this).parent().parent().append("<div class='zkbtn'>open</div>");
}) }
$(".zkbtn").click(function(event){ })
event.stopPropagation(); $(".zkbtn").click(function(event){
event.preventDefault(); event.stopPropagation();
$(this).parent().find("p").parent().toggleClass("tdiv"); event.preventDefault();
if ($(this).parent().find("p").parent().hasClass("tdiv")) { $(this).parent().find("p").parent().toggleClass("tdiv");
$(this).html("close") if ($(this).parent().find("p").parent().hasClass("tdiv")) {
}else{ $(this).html("close")
$(this).html("open") }else{
} $(this).html("open")
}) }
})
}
}) })
}); });
......
...@@ -166,10 +166,21 @@ ...@@ -166,10 +166,21 @@
@section footer{ @section footer{
<script> <script>
function IsPC() {
let source = true;
if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) {
source = false
} else {
source =true
}
return source
}
$(function () { $(function () {
$("#tab2 .txt p").wrap("<div style='height: 100px;overflow: hidden;'></div>"); if (IsPC()) {
$("#tab2 .txt p").wrap("<div style='height: 100px;overflow: hidden;'></div>");
$("#tab3 p").wrap("<div style='height: 50px;overflow: hidden;'></div>"); $("#tab3 p").wrap("<div style='height: 50px;overflow: hidden;'></div>");
}
var url = $(location).attr('href'); var url = $(location).attr('href');
var oindex = url.indexOf("#"); var oindex = url.indexOf("#");
...@@ -199,30 +210,32 @@ ...@@ -199,30 +210,32 @@
$(this).addClass("active"); $(this).addClass("active");
var con = $(this).attr("href"); var con = $(this).attr("href");
$(con).addClass("active").siblings().removeClass("active"); $(con).addClass("active").siblings().removeClass("active");
$("#tab2 .row").addClass("disflex"); if (IsPC()) {
$("#tab3 .row").addClass("disflex"); $("#tab2 .row").addClass("disflex");
$("#tab2 .txt p").each(function(){ $("#tab3 .row").addClass("disflex");
console.log($(this).height()); $("#tab2 .txt p").each(function(){
if ($(this).height()>100) { console.log($(this).height());
$(this).parent().parent().append("<div class='zkbtn'>open</div>"); if ($(this).height()>100) {
} $(this).parent().parent().append("<div class='zkbtn'>open</div>");
}) }
$("#tab3 p").each(function(){ })
console.log($(this).height()); $("#tab3 p").each(function(){
if ($(this).height()>50) { console.log($(this).height());
$(this).parent().parent().append("<div class='zkbtn'>open</div>"); if ($(this).height()>50) {
} $(this).parent().parent().append("<div class='zkbtn'>open</div>");
}) }
$(".zkbtn").click(function(event){ })
event.stopPropagation(); $(".zkbtn").click(function(event){
event.preventDefault(); event.stopPropagation();
$(this).parent().find("p").parent().toggleClass("tdiv"); event.preventDefault();
if ($(this).parent().find("p").parent().hasClass("tdiv")) { $(this).parent().find("p").parent().toggleClass("tdiv");
$(this).html("close") if ($(this).parent().find("p").parent().hasClass("tdiv")) {
}else{ $(this).html("close")
$(this).html("open") }else{
} $(this).html("open")
}) }
})
}
}) })
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment