无法在HTML表单的输入字段中输入文本

时间:2015-08-09 05:42:08

标签: html css

我没有太多的CSS调试经验。我在webflow上创建了一个html页面,并获得了相应的css文件。但是我不能以任何形式在输入字段中输入任何文本。 html是:

-webkit-appearance: textfield;
-webkit-rtl-ordering: logical;
-webkit-user-select: text;
background-color: rgb(255, 255, 255);
border-bottom-color: rgb(238, 238, 238);
border-bottom-style: inset;
border-bottom-width: 2px;
border-image-outset: 0px;
border-image-repeat: stretch;
border-image-slice: 100%;
border-image-source: none;
border-image-width: 1;
border-left-color: rgb(238, 238, 238);
border-left-style: inset;
border-left-width: 2px;
border-right-color: rgb(238, 238, 238);
border-right-style: inset;
border-right-width: 2px;
border-top-color: rgb(238, 238, 238);
border-top-style: inset;
border-top-width: 2px;
color: rgb(0, 0, 0);
cursor: auto;
display: inline-block;
font-family: '.HelveticaNeueDeskInterface-Regular';
font-size: 11px;
font-stretch: normal;
font-style: normal;
font-variant: normal;
font-weight: normal;
height: 13px;
letter-spacing: normal;
line-height: normal;
margin-bottom: 0px;
margin-left: 0px;
margin-right: 0px;
margin-top: 0px;
padding-bottom: 1px;
padding-left: 1px;
padding-right: 1px;
padding-top: 1px;
text-align: start;
text-indent: 0px;
text-rendering: auto;
text-shadow: none;
text-transform: none;
width: 125px;
word-spacing: 0px;
writing-mode: lr-tb;
-webkit-writing-mode: horizontal-tb;

输入字段的css属性是(从chrome开发人员工具复制):

-webkit-app-region: no-drag;
-webkit-appearance: textfield;
-webkit-background-composite: source-over;
-webkit-border-horizontal-spacing: 0px;
-webkit-border-vertical-spacing: 0px;
-webkit-box-align: stretch;
-webkit-box-decoration-break: slice;
-webkit-box-direction: normal;
-webkit-box-flex: 0;
-webkit-box-flex-group: 1;
-webkit-box-lines: single;
-webkit-box-ordinal-group: 1;
-webkit-box-orient: horizontal;
-webkit-box-pack: start;
-webkit-box-reflect: none;
-webkit-column-break-after: auto;
-webkit-column-break-before: auto;
-webkit-column-break-inside: auto;
-webkit-column-count: auto;
-webkit-column-gap: normal;
-webkit-column-rule-color: rgb(0, 0, 0);
-webkit-column-rule-style: none;
-webkit-column-rule-width: 0px;
-webkit-column-span: none;
-webkit-column-width: auto;
-webkit-font-smoothing: auto;
-webkit-highlight: none;
-webkit-hyphenate-character: auto;
-webkit-line-box-contain: block inline replaced;
-webkit-line-break: auto;
-webkit-line-clamp: none;
-webkit-locale: "en";
-webkit-margin-after-collapse: collapse;
-webkit-margin-before-collapse: collapse;
-webkit-mask-box-image: none;
-webkit-mask-box-image-outset: 0px;
-webkit-mask-box-image-repeat: stretch;
-webkit-mask-box-image-slice: 0 fill;
-webkit-mask-box-image-source: none;
-webkit-mask-box-image-width: auto;
-webkit-mask-clip: border-box;
-webkit-mask-composite: source-over;
-webkit-mask-image: none;
-webkit-mask-origin: border-box;
-webkit-mask-position: 0% 0%;
-webkit-mask-repeat: repeat;
-webkit-mask-size: auto;
-webkit-print-color-adjust: economy;
-webkit-rtl-ordering: logical;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0.4);
-webkit-text-combine: none;
-webkit-text-decorations-in-effect: none;
-webkit-text-emphasis-color: rgb(0, 0, 0);
-webkit-text-emphasis-position: over;
-webkit-text-emphasis-style: none;
-webkit-text-fill-color: rgb(0, 0, 0);
-webkit-text-orientation: vertical-right;
-webkit-text-security: none;
-webkit-text-stroke-color: rgb(0, 0, 0);
-webkit-text-stroke-width: 0px;
-webkit-user-drag: auto;
-webkit-user-modify: read-only;
-webkit-user-select: text;
align-content: start;
align-items: start;
align-self: start;
alignment-baseline: auto;
animation-delay: 0s;
animation-direction: normal;
animation-duration: 0s;
animation-fill-mode: none;
animation-iteration-count: 1;
animation-name: none;
animation-play-state: running;
animation-timing-function: ease;
backface-visibility: visible;
background-attachment: scroll;
background-blend-mode: normal;
background-clip: border-box;
background-color: rgb(255, 255, 255);
background-image: none;
background-origin: padding-box;
background-position: 0% 0%;
background-repeat: repeat;
background-size: auto;
baseline-shift: 0px;
border-bottom-color: rgb(238, 238, 238);
border-bottom-left-radius: 0px;
border-bottom-right-radius: 0px;
border-bottom-style: inset;
border-bottom-width: 2px;
border-collapse: separate;
-webkit-border-image: none;
border-image-outset: 0px;
border-image-repeat: stretch;
border-image-slice: 100%;
border-image-source: none;
border-image-width: 1;
border-left-color: rgb(238, 238, 238);
border-left-style: inset;
border-left-width: 2px;
border-right-color: rgb(238, 238, 238);
border-right-style: inset;
border-right-width: 2px;
border-top-color: rgb(238, 238, 238);
border-top-left-radius: 0px;
border-top-right-radius: 0px;
border-top-style: inset;
border-top-width: 2px;
bottom: auto;
box-shadow: none;
box-sizing: content-box;
buffered-rendering: auto;
caption-side: top;
clear: none;
clip: auto;
clip-path: none;
clip-rule: nonzero;
color: rgb(0, 0, 0);
color-interpolation: sRGB;
color-interpolation-filters: linearRGB;
color-rendering: auto;
cursor: auto;
cx: 0px;
cy: 0px;
direction: ltr;
display: inline-block;
dominant-baseline: auto;
empty-cells: show;
fill: rgb(0, 0, 0);
fill-opacity: 1;
fill-rule: nonzero;
filter: none;
flex-basis: auto;
flex-direction: row;
flex-grow: 0;
flex-shrink: 1;
flex-wrap: nowrap;
float: none;
flood-color: rgb(0, 0, 0);
flood-opacity: 1;
font-family: '.HelveticaNeueDeskInterface-Regular';
font-kerning: auto;
font-size: 11px;
font-stretch: normal;
font-style: normal;
font-variant: normal;
font-variant-ligatures: normal;
font-weight: normal;
glyph-orientation-horizontal: 0deg;
glyph-orientation-vertical: auto;
height: 13px;
image-rendering: auto;
isolation: auto;
justify-content: start;
left: auto;
letter-spacing: normal;
lighting-color: rgb(255, 255, 255);
line-height: normal;
list-style-image: none;
list-style-position: outside;
list-style-type: disc;
margin-bottom: 0px;
margin-left: 0px;
margin-right: 0px;
margin-top: 0px;
marker-end: none;
marker-mid: none;
marker-start: none;
mask: none;
mask-type: luminance;
max-height: none;
max-width: none;
min-height: 0px;
min-width: 0px;
mix-blend-mode: normal;
object-fit: fill;
object-position: 50% 50%;
opacity: 1;
order: 0;
orphans: auto;
outline-color: rgb(0, 0, 0);
outline-offset: 0px;
outline-style: none;
outline-width: 0px;
overflow-wrap: normal;
overflow-x: visible;
overflow-y: visible;
padding-bottom: 1px;
padding-left: 1px;
padding-right: 1px;
padding-top: 1px;
page-break-after: auto;
page-break-before: auto;
page-break-inside: auto;
paint-order: fill stroke markers;
perspective: none;
perspective-origin: 65.5px 9.5px;
pointer-events: auto;
position: static;
r: 0px;
resize: none;
right: auto;
rx: 0px;
ry: 0px;
shape-image-threshold: 0;
shape-margin: 0px;
shape-outside: none;
shape-rendering: auto;
speak: normal;
stop-color: rgb(0, 0, 0);
stop-opacity: 1;
stroke: none;
stroke-dasharray: none;
stroke-dashoffset: 0px;
stroke-linecap: butt;
stroke-linejoin: miter;
stroke-miterlimit: 4;
stroke-opacity: 1;
stroke-width: 1px;
tab-size: 8;
table-layout: auto;
text-align: start;
text-anchor: start;
text-decoration: none;
text-indent: 0px;
text-overflow: clip;
text-rendering: auto;
text-shadow: none;
text-transform: none;
top: auto;
touch-action: auto;
transform: none;
transform-origin: 65.5px 9.5px;
transform-style: flat;
transition-delay: 0s;
transition-duration: 0s;
transition-property: all;
transition-timing-function: ease;
unicode-bidi: normal;
vector-effect: none;
vertical-align: baseline;
visibility: visible;
white-space: normal;
widows: 1;
width: 125px;
will-change: auto;
word-break: normal;
word-spacing: 0px;
word-wrap: normal;
writing-mode: lr-tb;
-webkit-writing-mode: horizontal-tb;
x: 0px;
y: 0px;
z-index: auto;
zoom: 1;

包括继承的属性:

    <script>

        if ( ! Detector.webgl ) Detector.addGetWebGLMessage();

        var SCREEN_WIDTH = window.innerWidth;
        var SCREEN_HEIGHT = window.innerHeight;
        var FLOOR = -250;

        var container, stats;
         var  group1 , group2 , group3 ;
        var camera, scene, controls;
        var renderer;

        var mesh;
        var textureCube;
        var cameraCube, sceneCube;
        var loader;


        var mouseX = 0, mouseY = 0;

        var windowHalfX = window.innerWidth / 2;
        var windowHalfY = window.innerHeight / 2;

        init();
        animate();

        function init() {

            container = document.createElement( 'div' );
            document.body.appendChild( container );

            // CAMERA and controls

            ....

            // SCENE

            scene = new THREE.Scene();

            // SKYBOX

            .....


              //models

               group1=...
               group2=...
               group3=...


        cubes = new THREE.Object3D() ;
        cubes.add( group1 ) ;
        cubes.add( group2 ) ;
        cubes.add( group3 ) ;

         mouseVector = new THREE.Vector3();
        projector = new THREE.Projector();

            // LIGHTS
            lights...

            // RENDERER

            renderer = new THREE.WebGLRenderer( { antialias: true } );
            renderer.setPixelRatio( window.devicePixelRatio );
            renderer.setSize( SCREEN_WIDTH, SCREEN_HEIGHT );
            renderer.domElement.style.position = "relative";

            renderer.autoClear = false;

            container.appendChild( renderer.domElement );

            //

            renderer.gammaInput = true;
            renderer.gammaOutput = true;

            // STATS

            stats = new Stats();
            container.appendChild( stats.domElement );

            // EVENTS

            window.addEventListener( 'resize', onWindowResize, false );
            window.addEventListener( 'mousemove', onDocumentMouseMove, false );


        }

        //

        function onWindowResize( event ) {

            ....
        }


        function onDocumentMouseMove(event) {
            mouseX = ( event.clientX - windowHalfX );
            mouseY = ( event.clientY - windowHalfY );
            mouseVector.x = 2 * (e.clientX / containerWidth) - 1;
            mouseVector.y = 1 - 2 * ( e.clientY / containerHeight );
        }


        //

        function animate() {

            requestAnimationFrame( animate );

            render();
            stats.update();

        }

        function render() {

            controls.update();

            cameraCube.rotation.copy( camera.rotation );

            renderer.clear();
            renderer.render( sceneCube, cameraCube );

        //raycast
             var raycaster = projector.pickingRay( mouseVector.clone(), camera );

            window.addEventListener( 'mousedown', onMouseDown, false );
            var onMouseDown = function ( event ) {
                     var intersects = raycaster.intersectObjects( cubes.children );
                      var intersection = intersects[0] , obj = intersection.object ;
                      obj.visible = false ; 
            };

            renderer.render( scene, camera );

        }

    </script>

出了什么问题?

1 个答案:

答案 0 :(得分:0)

感谢大家的评论。我发现了原因......我从html中删除了这个:

<div class="w-section modal-background"></div>

有效。

关联的css属性为:

.modal-background {
  position: fixed;
  left: 0px;
  top: 0px;
  right: 0px;
  bottom: 0px;
  z-index: 3;
  display: block;
  margin-right: auto;
  margin-left: auto;
}