テーブルtd_html/css_WEB-ITnose内のフローティングレイヤー位置のCSS問題
<html><head> <style type="text/css"> .td_myadd { vertical-align: bottom; } </style> <script language="javascript" type="text/javascript"> function getSelectedValue(ddl_id, text_id) { var obj = document.getElementById(ddl_id); var obj2 = document.getElementById(text_id); for (var i = 0; i < obj.options.length; i++) { if (obj.options[i].selected) { // return obj.value; if (obj.options[i].value.length > 0) obj2.value = obj.value; } } } </script></head><body> <table style="border:1px solid # 000;"> <tr> <td class="td_myadd" name="tname_dg4" style="display: "> <textarea name="sbd_repeater1$Repeater1$ctl00$txtbox_dg4|5" rows="2" cols="20" id="Textarea4" class="usernameFldinput" onblur="javascript:this.style.backgroundColor= ''" onfocus="javascript:this.style.backgroundColor= '#FFC1C1'" onpropertychange="this.style.height=this.scrollHeight + 'px'" oninput="this.style.height=this.scrollHeight + 'px'" onkeypress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false" style="overflow-y: hidden; height: 18px; width: 36px; border-bottom: black 1px solid; border-top-style: none; border-right-style: none; border-left-style: none; ime-mode: disabled;"></textarea> </td> <td class="td_myadd" name="tname_dg4" style="display: "> <textarea name="sbd_repeater1$Repeater1$ctl00$txtbox_dg4|5" rows="2" cols="20" id="sbd_repeater1_Repeater1_ctl00_txtbox_dg4|5" class="usernameFldinput" onblur="javascript:this.style.backgroundColor= ''" onfocus="javascript:this.style.backgroundColor= '#FFC1C1'" onpropertychange="this.style.height=this.scrollHeight + 'px'" oninput="this.style.height=this.scrollHeight + 'px'" onkeypress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false" style="overflow-y: hidden; height: 18px; width: 36px; border-bottom: black 1px solid; border-top-style: none; border-right-style: none; border-left-style: none; ime-mode: disabled;"></textarea> </td> <td class="td_myadd" name="tname_sl2111" style="display: "> <div style="margin-bottom: 20px; width: 61px"> <div style="position: absolute; z-index: 1"> <select name="sbd_repeater1$Repeater1$ctl00$txtbox_sl2111|5$ddl1" id="sbd_repeater1_Repeater1_ctl00_txtbox_sl2111|5_ddl1" onclick="getSelectedValue('sbd_repeater1_Repeater1_ctl00_txtbox_sl2111|5_ddl1','sbd_repeater1_Repeater1_ctl00_txtbox_sl2111|5_tb1')" style="border-bottom: black 1px solid; border-top-style: none; border-right-style: none; border-left-style: none; width: 61px;"> <option value=""></option> <option value="不含税">不含税</option> </select> </div> <div style="position: absolute; z-index: 2"> <input name="sbd_repeater1$Repeater1$ctl00$txtbox_sl2111|5$tb1" type="text" id="sbd_repeater1_Repeater1_ctl00_txtbox_sl2111|5_tb1" style="width: 46px; border-bottom: black 1px solid; border-top-style: none; border-right-style: none; border-left-style: none; width: 46px;" /> </div> </div> </td> <td class="td_myadd" name="tname_dw" style="display: "> <div style="margin-bottom: 20px; width: 61px"> <div style="position: absolute; z-index: 1"> <select name="sbd_repeater1$Repeater1$ctl00$txtbox_dw|5$ddl1" id="sbd_repeater1_Repeater1_ctl00_txtbox_dw|5_ddl1" onclick="getSelectedValue('sbd_repeater1_Repeater1_ctl00_txtbox_dw|5_ddl1','sbd_repeater1_Repeater1_ctl00_txtbox_dw|5_tb1')" style="border-bottom: black 1px solid; border-top-style: none; border-right-style: none; border-left-style: none; width: 61px;"> <option value=""></option> <option value="PCS">PCS</option> <option value="个">个</option> <option value="公斤">公斤</option> <option value="计">计</option> <option value="元">元</option> </select> </div> <div style="position: absolute; z-index: 2"> <input name="sbd_repeater1$Repeater1$ctl00$txtbox_dw|5$tb1" type="text" id="sbd_repeater1_Repeater1_ctl00_txtbox_dw|5_tb1" style="width: 46px; border-bottom: black 1px solid; border-top-style: none; border-right-style: none; border-left-style: none; width: 46px;" /> </div> </div> </td> </tr> </table></body></html>
输入框会自动换行,把TD撑大,TD的样式 vertical-align: bottom;
但是右边的 没有居下
右边的是可输入的下拉框,做了3个层,一个输入框,一个下拉框,
我想TD撑大时那堆东西都居下对齐。有没有用样式可以解决的方案。不用JS。
回复讨论(解决方案)
有人能来看看嘛
给td加个 position:relative; 然后给td的子标签加position:absolute; 然后设置该div的bottom属性就可以了...

ホットAIツール

Undresser.AI Undress
リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover
写真から衣服を削除するオンライン AI ツール。

Undress AI Tool
脱衣画像を無料で

Clothoff.io
AI衣類リムーバー

AI Hentai Generator
AIヘンタイを無料で生成します。

人気の記事

ホットツール

メモ帳++7.3.1
使いやすく無料のコードエディター

SublimeText3 中国語版
中国語版、とても使いやすい

ゼンドスタジオ 13.0.1
強力な PHP 統合開発環境

ドリームウィーバー CS6
ビジュアル Web 開発ツール

SublimeText3 Mac版
神レベルのコード編集ソフト(SublimeText3)

ホットトピック









この記事では、HTML&lt; Progress&gt;について説明します。要素、その目的、スタイリング、および&lt; meter&gt;との違い要素。主な焦点は、&lt; Progress&gt;を使用することです。タスクの完了と&lt; Meter&gt; statiの場合

この記事では、HTML&lt; Datalist&GT;について説明します。オートコンプリートの提案を提供し、ユーザーエクスペリエンスの改善、エラーの削減によりフォームを強化する要素。

記事では、HTML5クロスブラウザーの互換性を確保するためのベストプラクティスについて説明し、機能検出、プログレッシブエンハンスメント、およびテスト方法に焦点を当てています。

この記事では、html&lt; meter&gt;について説明します。要素は、範囲内でスカラーまたは分数値を表示するために使用され、Web開発におけるその一般的なアプリケーション。それは差別化&lt; Meter&gt; &lt; Progress&gt;およびex

この記事では、ブラウザのユーザー入力を直接検証するために、必要、パターン、MIN、MAX、および長さの制限などのHTML5フォーム検証属性を使用して説明します。

この記事では、モバイルデバイスのレスポンシブWebデザインに不可欠なViewportメタタグについて説明します。適切な使用により、最適なコンテンツのスケーリングとユーザーの相互作用が保証され、誤用が設計とアクセシビリティの問題につながる可能性があることを説明しています。

この記事では、&lt; iframe&gt;外部コンテンツをWebページ、その一般的な用途、セキュリティリスク、およびオブジェクトタグやAPIなどの代替案に埋め込む際のタグの目的。

GiteEpages静的Webサイトの展開が失敗しました:404エラーのトラブルシューティングと解像度Giteeを使用する
