小编use*_*301的帖子

禁用水平滚动

好吧,出于某种原因,我的网页从左向右滚动显示了很多丑陋的空间.

我搜索了结果,但他们刚刚制作了滚动条隐藏

这就是我想要的,我想在物理上禁用水平滚动功能.我不希望用户能够在我的页面上上下左右滚动!

我试过:overflow-x:hidden在我的html标签上的css 但它只是隐藏了滚动条并且没有禁用滚动.

请帮我!

以下是该页面的链接:http://www.green-panda.com/usd309bands/(链接断开)

这可能会让你更好地了解我在说什么:

这是第一页加载的时间:

在此输入图像描述

这是在我滚动到右边之后:

在此输入图像描述

html css

162
推荐指数
8
解决办法
34万
查看次数

使用jQuery验证在单独的div中显示错误消息

我正在使用jQuery验证,我想在div中显示错误消息<div class="alert alert-error" id="errorContainer">显示在窗体下面的默认值不适用于我的表单设计.

验证脚本链接到我有表单的页面,它看起来像:

    $(function validate() {

    var rules = {
                rules: {
                    full_name: {
                        minlength: 2,
                        maxlength: 50,
                        required: true
                    },
                    address: {
                        minlength: 5,
                        required: true
                    },
                    city: {
                        minlength: 2,
                        required: true
                    },
                    state: {
                        minlength: 2,
                        maxlength: 2,
                        required: true
                    },
                    zip: {
                        minlength:5, 
                        maxlength:5,
                        required: true
                    },
                    phone: {
                        required: true,
                        phoneUS: true
                    },
                    phone_other: {
                        required: true,
                        phoneUS: true
                    },
                    email: {
                        required: true,
                        email: true
                    },
                    date_to_start: {
                        required: true …
Run Code Online (Sandbox Code Playgroud)

jquery jquery-validate

6
推荐指数
2
解决办法
4万
查看次数

在Bootstrap中制作英雄单位符合我的需要

我正在使用Twitter Bootstrap,我试图让Hero Unit达到页面的整个高度,然后他们可以点击一个按钮然后向下滚动.我还想在单位底部的英雄单位中显示一些文字.

我添加了:height: 100%;以及vertical-align:bottom;:text-align:center;

在css文件中的英雄单位无济于事.它几乎看起来像你无法编辑它:(

以下是Hero Unit Class的完整CSS:

    .hero-unit {
  height: 100%;
  min-height: 649px;
  padding: 60px;
  margin-bottom: 30px;
  font-size: 18px;
  font-weight: 200;
  line-height: 30px;
  text-align: center;
  vertical-align: middle;
  color: inherit;
  background-color: #eeeeee;
  background-image: url('../img/blured.jpg');
  -webkit-border-radius: 6px;
     -moz-border-radius: 6px;
          border-radius: 6px;
}

.hero-unit h1 {
  margin-bottom: 0;
  font-size: 60px;
  line-height: 1;
  letter-spacing: -1px;
  color: inherit;
}

.hero-unit li {
  line-height: 30px;
}
Run Code Online (Sandbox Code Playgroud)

和英雄单位的HTML:

<!--HERO UNIT -->
        <div class="hero-unit"> 
            <div class="container-fluid"> 
                <div class="row-fluid"> 
                    <div class="span4"> 
                        <h4>The …
Run Code Online (Sandbox Code Playgroud)

html css twitter-bootstrap

2
推荐指数
1
解决办法
7900
查看次数

根据会话数据更改样式表

好的我在我的应用程序中启动了一个会话,它获得了一个定义主题的会话变量.

我有这个代码,但似乎根本没有工作.基本上我希望根据用户在注册时选择的主题选择正确的样式表.因此,如果他们选择了默认主题,我需要链接的默认css文件等等......

我对PHP很新,所以如果它完全错了,请告诉我,但请帮助并告诉我什么是错的.我们都从某个地方开始.

<?php 
$themeName = '$_SESSION["SESS_THEME_NAME"]';
if ($themeName == "Default") {
    echo '<link rel="stylesheet" type="text/css" href="mws-theme.css" />';
}
if ($themeName == "Army") {
    echo '<link rel="stylesheet" type="text/css" href="mws-theme-army.css" />';
}
if ($themeName == "Rocky Mountains") {
    echo '<link rel="stylesheet" type="text/css" href="mws-theme-rocky.css" />';
}
if ($themeName == "Chinese Temple") {
    echo '<link rel="stylesheet" type="text/css" href="mws-theme-chinese.css" />';
}
if ($themeName == "Boutique") {
    echo '<link rel="stylesheet" type="text/css" href="mws-theme-boutique.css" />';
}
if ($themeName == "Toxic") {
    echo '<link rel="stylesheet" type="text/css" href="mws-theme-toxic.css" />'; …
Run Code Online (Sandbox Code Playgroud)

php

0
推荐指数
1
解决办法
160
查看次数

标签 统计

css ×2

html ×2

jquery ×1

jquery-validate ×1

php ×1

twitter-bootstrap ×1