Watertight mechanism of the housing includes a casing member having a first edge defining a periphery of the opening, is arranged so as to cover the opening, a second edge facing the first edge, a lid member to be fixed to the case member inclined in the detachable direction with respect to a direction through the opening, is interposed between the first edge and the second edge portion, said lid member an annular elastic member for closing the gap between the compressed into the detachable direction when secured to the casing member and the first edge and the second edge portion, is formed on the elastic member, wherein when the elastic member is compressed in the detachable direction, a first portion gap between the second edge and the first edge is arranged on the narrow side, is formed on the elastic member, wherein when the elastic member is compressed in the detachable direction, the side where the gap is widened between the second edge and the first edge It is disposed, and a second portion having a larger the detachable dimension than the detachable dimension of said first portion.筐体の水密機構は、開口部の周囲を規定する第1縁部を有するケース部材と、前記開口部を覆うように配置され、前記第1縁部と対向する第2縁部を有し、前記開口部を貫通する方向に対して傾いた着脱方向に前記ケース部材に固定されるための蓋部材と、前記第1縁部と前記第2縁部との間に介在され、前記蓋部材が前記ケース部材に固定される際に前記着脱方向に圧縮されて前記第1縁部と前記第2縁部との間の隙間を塞ぐための環状の弾性部材と、前記弾性部材に形成され、前記弾性部材が前記着脱方向に圧縮される際に、前記第1縁部と前記第2縁部との間の隙間が狭くなる側に配置される第1部分と、前記弾性部材に形成され、前記弾性部材が前記着脱方向に圧縮される際に、前記第1縁部と前記第2縁部との間の隙間が広がる側に配置され、前記第1部分の前記着脱方向の寸法よりも大きい前記着脱方向の寸法を有する第2部分と、を備える。