济南华远数控设备有限公司

济南华远数控设备有限公司是一家专注于中空玻璃设备、中空玻璃生产线和中空玻璃加工设备的生产企业。公司以科技创新为核心,致力于为客户提供高品质、高效率的解决方案。

网站功能介绍

该网站的主要功能包括:

  1. 产品展示:通过滚动图片的方式展示公司的中空玻璃设备、中空玻璃生产线和中空玻璃加工设备,方便客户了解产品特点和性能。

  2. 点击搜索按钮展开或收起相关产品的详细信息,方便客户查找所需的产品信息。

  3. 页面加载完成后自动调用checkImg()函数,对页面上的所有大图进行缩放处理,确保所有图片在显示时不会过大影响加载速度。同时,调整图片的宽高比,使其保持正常的视觉效果。

  4. .content类设置了行高为21px,内边距为0,使得页面内容更加紧凑。

代码示例

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>济南华远数控设备有限公司</title>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
</head>
<body>
<div class="search_dh">
<input type="text" id="search_key" placeholder="请输入关键词">
<button type="button">搜索</button>
</div>
<div class="content">
<img id="big_img" src="path/to/image1.jpg" alt="产品1">
<p>这里是关于产品1的详细信息。</p>
</div>
<script>
$(document).ready( function(){
$("#search_key").click(function(){
$(".search_dh").slideToggle();
});
window.setTimeout("checkImg()", 500);
});

function checkImg(){
if(document.getElementById("big_img")!=null){
var imgs = document.getElementById("big_img").getElementsByTagName("img");
for(var i=0;i<imgs.length;i++){
if(imgs[i].width > 250){
imgs[i].height = imgs[i].height * 250/imgs[i].width;
imgs[i].width = 250;
}
}
}
}
</script>
</body>
</html>